Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Backup Redhat FC8 to Mac 10.5 Leopard

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials
Author Message
petercrocker



Joined: 16 Oct 2007
Posts: 5
Location: Washington, DC

Posted: Fri May 02, 2008 12:21 pm    Post subject: 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:

Code: 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>]

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:
Code: error: invalid Python installation: unable to open /usr/lib/python2.5/config/Makefile (No such file or directory)

It was solved with this:
Code: yum install python-devel.i386

The second error was this:
Code: _librsyncmodule.c:25:22: error: librsync.h: No such file or directory

It was solved with this:
Code: yum install librsync-devel.i386

Then I went and compiled and installed rdiff-backup:
Code: 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.

Code: /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.
Code: - /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:

Quote: 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
Back to top  
Toqii



Joined: 14 Aug 2008
Posts: 1

Posted: Thu Aug 14, 2008 7:24 am    Post subject:  

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



Joined: 12 Aug 2008
Posts: 1

Posted: Thu Aug 14, 2008 11:05 am    Post subject:  

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



Joined: 17 Feb 2006
Posts: 80

Posted: Mon Aug 18, 2008 6:28 am    Post subject:  

Toqii wrote: 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 .....
Back to top  
 
       Linode.com Forum Forum Index -> Linux Tips, Tricks, Tutorials
Page 1 of 1