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
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):-
rsync -aEv ...I tried this and got
rsync: on remote machine: --extended-attributes: unknown optionThis confused me;
E. 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
rsynccould not find it. I discovered that
scpassumes all paths are relative to the home directory, and apparently so does
rsync; 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.