I decided to implement a rsync strategy similar to that suggested by @goldilocks https://raspberrypi.stackexchange.com/a/5492/8697
BACKGROUND I have a Pi, which is mainly used headless via ssh or VNC. I also run netatalk on the Pi so I can mount the home directory in Finder (or QuollEyeTree). I want to run the backup on my Mac.
I have a rsync-exclude.txt which contains:-
/proc/*
/sys/*
/dev/*
/boot/*
/tmp/*
/run/*
/mnt/*
and run my rsync with the following script
#!/bin/bash
# script to synchronise Pi files to backup
rsync -av --delete-during --exclude-from=bin/rsync-exclude.txt pi@MYPINAME.local:/ /Volumes/Data/PiBackup
I encountered a number of issues, which are my actual questions (if anyone can help):-
@goldilocks used
rsync -aEv ...I tried this and gotrsync: on remote machine: --extended-attributes: unknown optionThis confused me;man rsynclistedE. I know extended attributes are not often used on Linux, but OS X makes extensive use of them, and if I list files on the Pi home directory (mounted on my Mac) I can see them, and list values.Initially I used
--exclude-from=~/bin/rsync-exclude.txt, butrsynccould not find it. I discovered thatscpassumes all paths are relative to the home directory, and apparently so doesrsync; although this does not seem to be documented.The script will not delete files from the backup when deleted on the Pi.
IO error encountered -- skipping file deletion
I assume this is related to file permissions. The backup files are all owned by my Mac user. I wonder what would happen if/when I try to restore the system files.
--progresssave the output and search for the IO error mentioned. – GuySoft Mar 10 '14 at 11:02man rsynccalls-E"preserve executability" -- I've stopped using that after someone pointed out-aincludes-p, "preserve permissions" (and executability is part of permissions). Of course that's not a solution to the problem and it would be the OSX implementation of rsync that you are using (if they are different)...just read user1133275's answer and sounds like they are. – goldilocks May 14 '15 at 10:33