the stable rdiff-backup is not looking so hot for metadata on OS X
Friday, June 6th, 2008Preamble: after a bunch of research, rdiff-backup looked like a good open source solution for OS X backup. And it's in macports!
Wrinkle: after getting further into my current backup project, I've become more aware of the difficulty of getting all of the various forms of OS X metadata backed up. Some research revealed the tool Backup Bouncer, which provides a way to run some tricky tests on any OS X backup system. Here I'm using the latest bbouncer (0.1.2), on a 10.4.11 system all patched up through security update 2008-03.
The stable version of rdiff-backup in macports is 1.0.5, which is what's being used for the following tests. I've poked at both this and the rdiff-backup-devel version, which is 1.1.15, but it doesn't automatically pull in the xattr module from macports. I'll retest with that version later. Also note that the bbouncer results don't suggest that xattr is doing 1.0.5 much good.
$ ./bbouncer create-vol rdifftest
$ sudo rdiff-backup /Volumes/Src /tmp/bb
$ sudo rdiff-backup --force -r 1D /tmp/bb /Volumes/rdifftest/
$ ./bbouncer verify -d /Volumes/Src/ /Volumes/rdifftest/
Verifying: basic-permissions ... ok
Verifying: timestamps ...
Sub-test: modification time ... ok
ok
Verifying: symlinks ... ok
Verifying: symlink-ownership ... ok
Verifying: hardlinks ... ok
Verifying: resource-forks ... FAIL
Verifying: finder-flags ... FAIL
Verifying: finder-locks ... FAIL
Verifying: creation-date ... FAIL
Verifying: bsd-flags ... FAIL
Verifying: extended-attrs ...
Sub-test: on files ... FAIL
Sub-test: on directories ... FAIL
Sub-test: on symlinks ... FAIL
FAIL
Verifying: access-control-lists ...
Sub-test: on files ... FAIL
Sub-test: on dirs ... FAIL
FAIL
Verifying: fifo ... FAIL
Verifying: devices ... FAIL
Verifying: combo-tests ...
Sub-test: xattrs + rsrc forks ... FAIL
Sub-test: lots of metadata ... FAIL
FAIL
That's a whole lot of FAIL, especially compared to the built-in OS X rsync, which passes on resource forks and finder flags, extended attributes for files and directories, ACLs, and the last few tests.
Granted, there are a bunch of things being tested by bbouncer that may or may not be of interest to the average user. A recent post by the author points out that bbouncer has a -T flag for indicating which level of paranoia to run at. Rerunning the test for rdiff-backup 1.0.5 with only critical tests is somewhat instructive:
$ ./bbouncer verify -d -T critical /Volumes/Src/ /Volumes/rdifftest/
Verifying: basic-permissions ... ok
Verifying: timestamps ...
Sub-test: modification time ... ok
ok
Verifying: symlinks ... ok
Verifying: resource-forks ... FAIL
Verifying: finder-flags ... FAIL
Compare to OS X's rsync:
$ ./bbouncer verify -d -T critical /Volumes/Src/ /Volumes/Dst/10-rsync-apple/
Verifying: basic-permissions ... ok
Verifying: timestamps ...
Sub-test: modification time ... ok
ok
Verifying: symlinks ... ok
Verifying: resource-forks ... ok
Verifying: finder-flags ... ok