Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri May 02, 2008 1:21 pm 
Offline
Senior Newbie

Joined: Tue Oct 16, 2007 11:56 am
Posts: 9
Location: UK
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


Top
   
 Post subject:
PostPosted: Thu Aug 14, 2008 8:24 am 
Offline

Joined: Thu Aug 14, 2008 8:18 am
Posts: 1
Hi, 8) very long but useful article, I had trid rdiff-backup too, thank you share this blog post.

_________________
flock for linux


Top
   
 Post subject:
PostPosted: Thu Aug 14, 2008 12:05 pm 
Offline
Senior Newbie

Joined: Tue Aug 12, 2008 9:39 am
Posts: 6
Website: http://www.sandycovesw.com
Location: CT, USA
FWIW, I'm pretty sure that Fink finally has a binary installer for 10.5 now.


Top
   
 Post subject:
PostPosted: Mon Aug 18, 2008 7:28 am 
Offline
Senior Member

Joined: Fri Feb 17, 2006 9:47 pm
Posts: 91
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 .....


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group