Skip to content

Instantly share code, notes, and snippets.

@h4cc h4cc/
Last active Jun 17, 2017

What would you like to do?
Backups with Ubuntu BackInTime onto a Synology DSM5 via SSH


Source: and:


Not everything here is explained. You need to know what you do. Also: DSM Updates will change your settings!


  • Make a new volume named volume1 (if it doesn't exist yet)
  • Enable User Home Service (Control Panel / User)
  • Make a new share named backups on volume1
  • Make a new share named volume1 on volume1 (It must be the same name)
  • Make a new user named backup
  • Give to user backup rights Read/Write to share backups and volume1, permission for FTP
  • Enable SSH (Control Panel / Terminal & SNMP / Terminal)
  • Enable SFTP (Control Panel / File Service / FTP / SFTP)
  • Since DSM 5.1: Enable Backup Service (Backup & Replication / Backup Service)
  • Log on as root by SSH
  • Modify the shell of user backup. Set it to /bin/sh
  • Make a new directory /volume1/volume1/backups
mkdir /volume1/volume1/backups
  • Mount /volume1/backups on /volume1/volume1/backups
mount -o bind /volume1/backups /volume1/volume1/backups

To auto-mount it make a script /usr/syno/etc/rc.d/


       /bin/mount -o bind /volume1/backups /volume1/volume1/backups

       /bin/umount /volume1/volume1/backups

case "$1" in
       start) start ;;
       stop) stop ;;
       *) ;;

and make it executeable:

chmod +x /usr/syno/etc/rc.d/ 
  • Make sure the persissions are correct for SSH
chown 755 /volume1/homes/backup
chmod 700 /volume1/homes/backup/.ssh
chmod 644 /volume1/homes/backup/.ssh/authorized_keys
  • On the workstation on which you try to use BIT make SSH keys for user backup, send the public key to the NAS.
ssh-keygen -t rsa -f ~/.ssh/backup_id_rsa
ssh-add ~/.ssh/backup_id_rsa
ssh-copy-id -i ~/.ssh/ backup@<synology-ip>
ssh backup@<synology-ip>
  • Now you can use BackInTime to perform your backup to your NAS with the user backup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.