Unwhackable: Subversion on S3

Since learning more about source control and fretting in general about data integrity and longevity (will I be able to view my digital photos 20 years from now?), I’ve been searching for some way to provide some reliable redundancy to my code.

I’m using Site5 as my Subversion server, which is perfect — I can access it wherever I like. But even though I’ve been very happy with Site5 since choosing them as a host, I’m pretty sure they don’t make any guarantees against data loss. Anything could happen. So, how do we periodically back up a Subversion repository dump in a “safe place”?

My home computer is not a server, and I plan on neither a) using it as a server, nor b) leaving it on at all hours of the day. So automatic backups to it are out of the question. What other options might be “safe”?

Linux Magazine had an article about Amazon.com’s “Tier 0″ simple storage service, S3. You can basically buy storage space by the gigabyte-month and bandwidth at very reasonable rates, provided you can program against their XML REST interface or the various language-specific reference hooks they’ve provided. The article mentioned JungleDisk in particular as a GUI-based app that makes transferring files to and from S3 a piece of cake.

What I came up for my own purposes is a small python script called svnbackup.py that can be used to backup and restore Subversion repositories, as well as deleting old backups. I use BitBucket to interface with S3. Invoked regularly as a cron job, it’s a pretty solid step towards unwhackable source control. Download svnbackup.tar.gz here.

The documentation included should get you up and running. Here’s how easy backing up your repository can be:

% ./svnbackup.py --backup ~/myrepo

and restoring the most recent backup created prior to noon, September 3rd:

% ./svnbackup.py --restore ~/myrepo 20060903_120000

Comments are closed.


Bad Behavior has blocked 817 access attempts in the last 7 days.