Apple Open Source

rsnapshot For Mac OS X

Lately I’ve been using rsync to keep two hard drives in sync. I’ve been thinking of switching to rsnapshot since it would give me with incremental backup which is much better. What I’ve yet to figure out is if it can handle resource forks (with Apple’s special flag in rsync), and HTS+’s. Google hasn’t returned much on the combination, so apparently there’s very little experience out there. As a result I guess I’m sticking with the more simple rsync until I see otherwise.

3 replies on “rsnapshot For Mac OS X”

I use rsnapshot to back up my 10.3 mac to an external USB2 drive. The patched version (with the –eahfs) flag works well. I’m using rsync 2.5.7 and rsnapshot 1.3.0.

My rsync_long_args looks like this:
rsync_long_args –eahfs –delete –numeric-ids –relative –delete-excluded

I have two issues. First, it takes a _really_ long time to do a full backup (3 hours for 60GB on a dual 1GHz G4). Second was that rsync 2.5.7 doesn’t seem to have a –link_dest flag (my build doesn’t for whatever reason). Since the OS X cp command can’t make hard links, I use gnucp instead, which does seem to preserve resource forks. I don’t recall where I got my copy of gnucp (maybe it’s included with 10.3), so you might want to test it with something like this:

$ CD /System\ Folder
$ gnucp -l Finder Finder_link
# make sure the inode is the same:
$ ls -i Finder*
430 Finder 430 Finder_link
# make sure the resource forks are the same:
$ /Developer/Tools/DeRez Finder > /tmp/Finder.derez
$ /Developer/Tools/DeRez Finder_link > /tmp/Finder_link.derez
$ diff /tmp/Finder.derez /tmp/Finder_link.derez

Check out rdiff-backup (, and see if it fits the bill.

I use it to backup an AWS instance down to my iMac into a case-sensitive sparsebundle file.

You can install rdiff-backup thru brew. I used apt to install rdiff-backup on my AWS Linux instance.

Leave a Reply

Your email address will not be published. Required fields are marked *