raspiBackup.sh is also used to store backups on Synology. I don't have a Synology and cannot execute any tests to help on any issues which pop up. That's why I created this page to allow users of a Synology to share their experiences with Synology and raspiBackup via comments.
The partition on the Synology has to be exported with no_root_squash in order to use rsync. Define for Squash No-mapping in te UI.
In addition I have enabled nfs4.1 and default Unix permissions.
192.168.0.42:/backup /backup nfs rw,nfsvers=3 0 0
Note about ACLs
nfs V3 supports ACLs. It works with a Raspberry as nfs Server (See here) . The answer in a Synology support ticket I opened on 5/13/22 was
Unfortunately, I have to inform you that both Linux ACL and setfacl are not supported by DSM.
I would be pass this on as feedback to our development department as a function request.
Comment from Markus
A backup can be created with raspiBackup.sh by using following configuration:
* Raspberry with Rasbian Whezzy
* raspiBackup.sh, Version 0.5.7.10e
* Synology NAS DS213, with current DSM version
Synology NAS Share: /volume1/backup
Synology NAS Share NFS Rules: Hostname oder IP: *, Privilege: Read/Write, Squash: No assignment
Synology NAS Share Access rights (Console): d--------- 5 root root 4096 Dec 15 06:01 backup
Raspberry Pi Mountpoint: /media/nas-backup
Raspberry Pi fstab entries forr NFS3 and NFS4
# Entry for the NAS backup, mount with NFS version 3
192.168.X.XXX:/volume1/backup /media/nas-backup nfs rw,nfsvers=3 0 0
# Entry for the NAS backup, mount with NFS version 4
#192.168.X.XXX:/volume1/backup /media/nas-backup nfs rw 0 0
Comments about NFS4 mounts:
User Jean described on the englisg page for raspibackuphow to create a backup with raspiBackup on share with NFS4. I wasn't able to test it. That's the permalink
Extract from raspiBackup.conf in /usr/local/etc/
# path to store the backupfile
# how many backups to keep
# type of backup: dd, tar, xbmc or rsync
I hope this helps other users of Synology to store their backups with raspiBackup on Synology.
Gotchas from Alfred
Alfred got following error message from rsync
rsync: chown "/mnt/nas/arami nta/araminta-rs ync-backup-2016 1029-190948/mmc blk0p1/overlays /.w1-gpio-overl ay.dtb.ansSC4" failed: Operation not permitted (1)"
sudo mkdir /tmp/mmcblk0p1
sudo mount /dev/mmcblk0p1 /tmp/mmcblk0p1
I then made an accidental error which ultimately led to a solution. This is the rsync command I issued:
rsync --exclude="/mnt/nas" --exclude=/proc/* --exclude=/lost+found/* --exclude=/sys/* --exclude=/dev/* --exclude=/boot/* --exclude=/tmp/* --exclude=/run/* --exclude=mmcblk0p1/overlays/* --numeric-ids -aHAXx -v /tmp/mmcblk0p1 "/mnt/nas/test.backup"
Comment from Markus
I am also using raspiBackup to backup my raspberry pi to a synology NAS via nfs.
Here is my configuration:
on the synology nas (DSM 6.2.1-23824 Update 4):
nas share: volume1/backup
file-services: Enable NFS, Enable NFSv4.1 support, advanced settings: Apply default Unix permissions
on the raspberry pi:
backup-mode: rsyncI modified the following variables on top of the script:
NFSSERVER="hostname/ip-address of nas"