
Backup Truenas to Synology via rsync
I found loads of posts on how to backup Synology to Truenas. However found it quite difficult to find a full up to date guide for Truenas to Synology. So I’ll attempt to make a guide here.
There are a number of various ways to accomplish this, however I will list the steps I took. I’ll try to provide in depth detail.
- Setup a new user account on Truenas named “rsync” SSH Public Key comes later

- On Truenas when creating the user if your datasets have special – I have a special group called Family where all my family members have access to all my datasets, now rsync user does too.

- permissions make sure rsync has access to the folders you want to backup – rsync has access to all my datasets

- Setup a new user account on Synology named “rsync” – select all the appropriate permissions



- Enable rsync on synology

- enable rsync account “Check Box” on Synology

- Edit rsync account and add “rsync” with the password of your choice

- Check your privileges and permissions on Synology to ensure “rsync” user has access to folders you will use as the target for backup.

- enable homes on synology go to Control Panel < Advanced < Check the box “Enable user Home Service”

- Next SSH into Synology as rsync@synologyip
###Next will require vim or nano###
sudo nano /etc/ssh/sshd_config
###Edit the following lines###
PubkeyAuthentication yes
AuthorizedKeyfile .ssh/authorized_key
#### Write and Quit in Vim, Save and exit in Nano###
###Make AUTH Key file###
cd /var/services/homes/rsync
mkdir .ssh
chmod 700 .ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
cd /var/services/homes
sudo chmod 700 rsync
- Go back to Synology and restart SSH deselect apply – reselect and apply


- Go back into TrueNAS, Create a dataset folder or a UNIX folder for rsync user to have a home Directory. Then go into User account and apply home directory.

- SSH into TrueNAS as root@truenasiphere
su rsync
ssh-keygen
cat .ssh/id_rsa.pub
- Copy the key, then past it under SSH Public Key under user info

Paste this key also into /var/services/homes/rsync/.ssh/authorized_keys on Synology that we created previously.
### From TrueNAS ####
ssh 192.168.10.20 (Synology IP) -l rsync
You should be able to SSH from TrueNAS to Synology without a password now.
Finally create a rsync task – I had to disable “Compress” or I got errors.
