Backups using rdiff-backup to a mac mini
A week ago I installed a Mac Mini as a media server. It doubles as a backup server for my web server and our laptops.
The laptops - both MacBooks - use Time Machine for backups into a shared folder on the Mini. That's fairly straight forward. For the Ubuntu-based web server I'm using rdiff-backup that has served me well for years already. Only difference now is, that the receiving end is the Mini running OS X.
Rdiff-backup itself is written in Python (jay!) and should work just fine on OS X. It uses the librsync library that's not by default available under OS X, it needs to be compiled and installed first. librsync in turns needs the popt library, that needed to be installed as well.
For both of these packages it was basically a matter of downloading and extracting the tarball and then doing a ./configure –prefix=/usr/local && make && sudo make install.
Then I tried building rdiff-backup by doing python2.5 ./setup.py build. This succeeded without warnings and installing with sudo python2.5 ./setup.py install seemed to go allright as well. However, when checking the version with /usr/local/bin/rdiff-backup –version gave a strange error message:
Traceback (most recent call last): ... ImportError: dlopen(/Library/Python/2.5/\ site-packages/rdiff_backup/_librsync.so, 2): Symbol not found: _rs_file_copy_cb Referenced from: /Library/Python/2.5/\ site-packages/rdiff_backup/_librsync.so Expected in: flat namespace in /Library/Python/2.5/site-packages/\ rdiff_backup/_librsync.so
Google didn't find me a useful hint. At a certain point I thought to try Python-2.6 instead of the Python-2.5 that comes with OS X. Building and installing rdiff-backup now worked like a charm!
The first testruns for backing up the web server revealed one more problem to solve. The backups are written to an external USB drive connected to the Mini and as it turned out, the user ids and group ids of the files are were not correctly written to this external disk - even though the backups are run by the root user.
A quick Google got me this hint: There's a setting found in the infobox for the mounted drive, where the "Ignore ownership on this volume" option can be turned off. That helps!
Backups are running fine now.