Backup Synology using RSync and RaspPI

In your video (https://www.youtube.com/watch?v=-dhnkncnLWs) you provide an IP address of 10.0.0.7 and connect to your Pi / Linux hard drive via the Hyperbackup module in Synology (it’s on 6.x DSM, but 7.x should work more or less the same). However I don’t know how you physically connected the pi / drive to the Synology, driving the standard IP address. Was it via the mentioned powered USB? Could it also work the same via a powered ethernet switch?

I used ethernet via router and used the Pi IP address from my router, and could not connect. Understanding how you connected / used the 10.0.0.7 might solve my conundrum.

PS - huge fan of SpaceRex videos. Living in Denmark. Cheers

Sounds like I’m having the exact same issue. The video seems to imply that the Pi and NAS are 9n the same local network. Ive followed the video exactly and get stuck when in the rsync wizard
I put in the Pi’s ip, use synology as the username, 123456 as the password. But then I try to select a backup module, it says “No reponse from the destination server.”

I’ve tried a bunch of things from various sources, but cant seem to get past this.

@Will - any tips to help us get past the connectivity from Synology to Pi? It’s really unclear how you’ve connected and seems I’m not the only one stuck. Many thanks!

It’s a permission problem. The owner of the HyperBackup task on the NAS does not have permission to access the destination directory.

To get the planets to align, lets go back to the Pi and tweak a few things so the rsync daemon and the directory the rsync process are run by the same user, and that user has the same uid as the HyperBackup task owner on the NAS.

Create a group and user using the uid of the NAS HyperBackup task user. This is likely your uid.

sudo groupadd -r -g 1027 synology
sudo useradd -r -u 1027 -g 1027 -m -c "Synology HyperBackup role" -d /home/synology -s /bin/false synology

Reprotect the destination directory. Mine is /home/synology. YMMV

sudo chown -R synology:synology /home/synology

Tweak the rsyncd.conf file to run as this user.

Grant explicit permissions in /etc/rsyncd.conf.

uid = synology
gid = synology
use chroot = no
pid file = /var/run/rsyncd.pid

[backup]
  path = /home/synology
  comment = Synology HyperBackup
  read only = false
  timeout = 300
  list = yes
  hosts allow = *
  auth users = synology
  secrets file = /etc/rsyncd.secrets

Restart the rsynd daemon to pick up the changes.

/etc/init.d/rsync restart

Cross your fingers that this recipe gets you closer!

@sk8rs_dad - many thanks for the tips. I am definitely going to work my way through this in the next few weeks (busy busy life right now) and I will come back to let you know if it worked. Really appreciate you pitching in / helping here. Cheers!

I got mine working finally. There were a few issues all combined, and each contributed to the overall issue:

  1. My NAS and Pi were on different subnets on myblocal network. Long story short, the Pi could see the NAS, but the NAS could not see the Pi. I will ultimately be using a Tailscale VPN, and the Tailscale IP will persist once I move offsite, I corrected this connecrion issue by using the Tailscale IP, even on my local network.

  2. The permissions were set wrong. I noticed that I could do a hyperbackup to a folder in my Pi’s user home directory, but not on the mounted HDD. SpaceRex mentions that after modifying the fstab file and mounting, you should redo the chmod 777… I had neglected to do this, and as soon as I changed permissions to 777 it started working again. The solution above may be the way to go (creating a new user/group), but I havent attempted it yet.

  3. Faulty USB power supply. The external HDD was going offline periodically. Each time I would have to remount it on the Pi, and sometimes the permissions would revert back, reintroducing the problem above. I stripped the HDD out of its case and put it in a powered USB HDD dock, and the issue went away.

All in all, it works now, even when I moved the Pi offsite. For a while there it just felt like I had to bite my tounge just right in order for the rsync to complete.