User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

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.

raspiBackup - Use Synology as backupspace

 

Note

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.

Synology nfs defs

In addition I have enabled nfs4.1 and default Unix permissions.

SynologyNFSAddtlSettings

If you want so save your ACLs you have to update /etc/idmapd.conf on your Rasperry and add the IP address of your Synology.
 
 
There exist pages which report about issues Synologies have with hardlinks when nfs v4 is used and which are used by rsync. Following config forces to use nfs v3
192.168.0.42:/backup /backup nfs rw,nfsvers=3 0 0
and raspiBackup succeeds. In addition softlinks are not supported with CIFS if the CIFS version used is not at least version 3.
 

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/

cat /usr/local/etc/raspiBackup.conf
# path to store the backupfile
DEFAULT_BACKUPPATH="/media/nas-backup"
# how many backups to keep
DEFAULT_KEEPBACKUPS=4
# type of backup: dd, tar, xbmc or rsync
DEFAULT_BACKUPTYPE="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)"
Then he used the rsync command from the raspiBackup.log to reproduce and test the rsync command without raspiBackup in order to fix the issue. Because he used the -P backup he had to execute following commands first
 
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" 
 
This command executes without any problems. Note however that I forgot to use 'sudo'. I ran the command again, this time with sudo and it failed. This IMHO points to an access problem on the Synology NAS. I went to the NAS and changed the NFS permissions from 'map all users to admin' to 'no mapping' and bingo, rsync worked.
 

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:

raspiBackup 0.6.4.2

backup-mode: rsync

I modified the following variables on top of the script:

NFSSERVER="hostname/ip-address of nas"
NFSDIRECTORY="/volume1/backup"
MOUNTPOINT="/backup"

 

Comment from Diego

 

Please find the commands for Raspberry Pi OS entries in fstab for CIFS version 1. Unless you details it, it will not connect.

//XX.XX.XX.XX/shared_folder1/shared_folder /destination_folder1/destination_folder2 cifs vers=1.0,username=user,password=pass,rw,file_mode=0777,dir_mode=0777 0 0
Add comment

*** Note ***

Comments are welcome. But in order to reject spam posts please consider following rules:
  1. Comments with string http are rejected with message You have no rights to use this tag
  2. All comments are reviewed by hand and thus it usually takes one day until a comment will be published.