Automated backups with rdiff-backup on Mac OS X
Since I wrote the original article I’ve come across another article about automated backups with rdiff-backup.
This is the setup that I’ve got working on Mac OS X—Tiger on the server and Panther on the client.
The disk volume setup is still as originally described: an HFS+, journaled partition with case preserving turned on and changed to not ignore permissions.
The rdiff-backup version is still the latest stable release and the exclude file list isn’t changed either. It is also important to note that the rdiff-backup program has to be installed somewhere in the SSH path; i.e. typically in /bin or /usr/bin.
Backup on the server is now handled identically to backup on the client. This required a SSH setup for localhost (here called dorado-backup) as well. The command to backup the server is now:
$ rdiff-backup --include-globbing-filelist \ > ~/src/tools/rdiff-backup-filelist \ > dorado-backup::/ /Volumes/Backup/Dorado
The backups are initiated from a new backup user as described here and rdiff-backup is run as root on the clients. This got rid of the problems I experienced initially with files that my backup user couldn’t access.
I had to leave out one part of that setup though. When the authorized_keys2 file is setup on the client I had to leave out the from=”server” part; probably because there is no DNS setup on my network or maybe it’s because the root logins are disabled on both hosts.
With this setup in place all that was left was to automate the whole thing with a crontab for the backup user.