[Updated] Simple Tutorial on Backing up Your (Small) Sites To Subversion

Jan 20
Posted on January 20, 2008 17:35 in Problems & Solutions, Software, Technology

Since I wrote this article I added a followup article fixing a small problem with this script. Read the article below first though!


This tutorial is really most of all a reminder for me, and some of my friends who use Site5 hosting. It has a few flaws which I will get back to in the end. This site is intended for small sites, like Wordpress blogs, running on shared hosts. The main idea is this: backup all the data of your website daily, automatically, to an offsite location.

Step 1: Get Access to a Subversion Repository

The great thing about Subversion is that it offers incremental backups, allowing you to go back in time as far as you need to restore any problems you might run into. Assembla.com offers free subversion hosting (besides all the other things they offer), which is virtually unlimited. They do charge corporations, but with my current use (4 sites doing a daily backup) I haven’t had any problem with them contacting me or something.

Simply sign up and set up a “Space”. Ignore most of the settings but make sure to setup a Trac+Subversion package for your space. This will enable Trac support and subversion. Once the site is setup, go into the Trac/SVN tab and check the Subversion URL. It should be something like this:

http://svn2.assembla.com/svn/<your_site_name>
(more…)