Backing Up TrueNAS SCALE to Synology Using rsync

Synology as a backup-only NAS

Contents

I have been a long-time Synology user and still consider their hardware excellent. However, last year Synology made several controversial decisions that ultimately pushed me to build a TrueNAS SCALE server as my primary storage platform.

That said, I did not abandon Synology entirely. I kept two Synology NAS devices for backups of my TrueNAS server, one on-site and one off-site. This guide documents how to configure rsync on TrueNAS SCALE to back up data to a Synology NAS reliably and securely on-site. The same configuration applies to off-site sync; a VPN should be used for transport security.

This guide uses a dedicated user named rsync for all three accounts involved: the Synology rsync account, the Synology local user account, and the TrueNAS SCALE user account.


Synology Configuration

  • Enable the rsync service:
  • Control Panel > File Services > rsync
  • Enable rsync service
  • Add rsync account
  • Click Edit rsync Account
  • Add the rsync user and set a strong password
  • Create and configure the user:
  • Control Panel > User & Group > Create user rsync
  • Add the user to the administrators and users groups
  • Grant read/write access to:
    • homes
    • NetBackup (default rsync target directory created by Synology when rsync is enabled)
  • Grant permission to use the rsync application
  • Enable SSH:
  • Control Panel > Terminal & SNMP
  • Enable SSH service

TrueNAS SCALE Configuration

  • Create the rsync user:
  • Credentials > Users > Add
  • Username: rsync
  • Enable: Shell access, SMB access, TrueNAS access (full admin)
  • Grant this user access to all datasets you intend to back up
  • Create SSH credentials:
  • Credentials > Backup Credentials > SSH Connections
  • Create a new SSH connection
  • Generate a new key pair
  • Leave the remote key field empty
  • Save the connection
  • Copy the public SSH key:
  • Credentials > SSH Keypairs
  • Open the newly created key
  • Copy the public key
  • Configure SSH access on Synology:
  • SSH into the Synology NAS as the rsync user from another machine
  • Create the SSH directory:
mkdir -p /var/services/homes/rsync/.ssh
  • Create the authorized keys file and paste the public key into the file:
vim /var/services/homes/rsync/.ssh/authorized_keys

save it with :wq

  • Set permissions:
chmod 700 /var/services/homes/rsync/.ssh
chmod 600 /var/services/homes/rsync/.ssh/authorized_keys
  • Finalize SSH connection in TrueNAS:
  • Edit the previously created SSH connection
  • Click Discover Remote Host Key
  • Save

Creating the rsync Task

  • In TrueNas, go to Data Protection > Rsync Tasks > Add
  • Configure the task:
  • Path: select the dataset to back up
  • User: rsync (alternatively, try root)
  • Direction: Push
  • Rsync Mode: SSH
  • Connect Using: SSH connection from keychain
  • SSH Connection: select the Synology connection
  • Remote Path: /volume1/NetBackup
  • Enable Validate Remote Path
  • Optional: enable Delete if you want files deleted on TrueNAS to also be deleted on Synology

Notes

The initial synchronization can take a long time depending on the amount of data. Subsequent runs are incremental and only transfer changed or new files, making ongoing backups fast and efficient.