Backup Redhat FC8 to Mac 10.5 Leopard

Full article with useful links here:

I spent quite a lot of hours trying to get this solution working, so I figure I’ll pass on the love…

Goal: Backup my Linode box running Fedora Core 8. It’s being backed up weekly via my MacBook Pro running MacOS 10.5 (Leopard). The files however are stored on my Time Capsule drive. I’m using an open-source tool called rdiff-backup to do the actual archiving and transferring. I liked rdiff-backup because it kinda works like Apple’s Time Machine, where old revisions are saved. It also uses SSH for transfers making it secure.

First, you need to have rdiff-backup installed in both locations. On the Linux side, I searched for a pre-compiled package, but all of them I found were compiled with rdiff-backup version 1.0.5, which is quite old, and doesn’t behave if you have a 1.1.X version on the Mac. I got the following errors as a result:

Warning: Local version 1.1.12 does not match remote version 1.0.5.
Exception '
Warning Security Violation!
Bad request for function: fs_abilities.get_readonly_fsa
with arguments: ['source', <rdiff_backup.rpath.rpath instance="" at="" 0x40258b8c="">]</rdiff_backup.rpath.rpath>

So I had to compile version 1.1.15 myself. To do that, I needed some development packages, all installed via yum. I got two errors along the way while compiling that made me see what packages I was missing. They’re development libraries needed to compile rdiff-backup.

The first error was this:

error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)

It was solved with this:

yum install python-devel.i386

The second error was this:

_librsyncmodule.c:25:22: error: librsync.h: No such file or directory

It was solved with this:

yum install librsync-devel.i386

Then I went and compiled and installed rdiff-backup:

wget http://savannah.nongnu.org/download/rdiff-backup/rdiff-backup-1.1.15.tar.gz
tar zxf rdiff-backup-1.1.15.tar.gz 
cd rdiff-backup-1.1.15/
python setup.py install

Now the Mac side. I decided to use a Fink package, so I didn’t have to do as much compiling. I couldn’t use the nice pretty installer, since apparently it’s not working for MacOS 10.5, so I had to download and compile Fink. I don’t have the steps any more in by iTerm buffer for how I installed Fink, but it was straightforward from the Fink website.

In order to compile, you need to have Xcode Tools 3.0 installed. Note you need to create a free ADC account before you can download it.

Finally, here’s the script I use to actually do the backups. I just put it in my Documents directory on my MacBook, and chmod 755 it so it’s executable.

/sw/bin/rdiff-backup --print-statistics --include-globbing-filelist /Users/username/Documents/server-backup.conf root@ip.myserver.com::/ /Volumes/TimeCapsuleDrive/ServerBackup

Note that the command is copying files straight from my server to the mounted Time Capsule home directory. Also note that to do a full backup of the server, you must ssh to the box as root. So make extra sure you only allow ssh logins as root using SSH RSA keys!

It references an “exception” file telling it directories not to backup. Here’s the contents of that file, also stored in my Documents directory. Note that each line starts with a dash, then a space, then a directory to exclude without a trailing slash.

- /dev
- /proc
- /tmp
- /var/tmp
- /lost+found

I then setup a weekly cron job to execute my script. I used CronniX to do that.

There were quite a few reference sites I leaned on to do this, so credit to those before me:

> rdiff-backup: The tool used, needed to the docs to figure out syntax

Ilari’s article: Scheduled Backups with rdiff-backup on Mac OS X

And an article on TheGrebs about rdiff-backup

3 Replies

Hi, 8) very long but useful article, I had trid rdiff-backup too, thank you share this blog post.

FWIW, I'm pretty sure that Fink finally has a binary installer for 10.5 now.

@Toqii:

Hi, 8) very long but useful article, I had trid rdiff-backup too, thank you share this blog post.

Umm as a howto this is really not that long …..

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct