SVN as a lightweight backup

by daniel on December 14, 2008

Source control is a great invention, a great tool for keeping track and documenting changes in a development project. The basics of source control are well documented elsewhere (see here and here

for two different options).

Basically, source control is a centralized solution for keeping track of changes to a file, in order to bring some order into the chaos of software development. The changes are stored in a central server and they can be deployed in various ways. There are several benefits of source control:

  • Keep history of changes and actual changes
  • Manage changes and flow of changes between group members
  • Minimize disk space usage for text files
  • Have a centralized storage for all revisions

The outlined benefits looked to me as very similar to the requirements of a light backup system, to be used with small documents and low bandwidth solution. This is more obvious when looking on the actual content of the files I needed to back up. Most of them are text files or simple word documents.

With these ideas in mind, I tried to use SVN for personal backup of the posts in the blog. The setup is as follows:

  • Linux server with SVN server (this was easy, it’s the HTPC)
  • Tortoise SVN on the main laptop used for typing
  • Tortoise SVN on the secondary computer, used for uploading and checking the site
  • The SVN is set up with HTTPS access only for security concerns

The workflow is as follows: Posts are written on a laptop, in phases. The pre finished posts are copied text only to a wikidpad (to be explained in a future post). Both of the versions are uploaded to the SVN for safekeeping. Later, the versions are revised for errors and changes before uploading. The updated versions are uploaded again to the svn and the post is uploaded to the site.

This far, the setup works perfectly since I have all versions of all post I wrote. Even when I had a problem with wikidpad, I could revert to an older version and solve the problem found. Although the word documents are binary and no storage efficiency is gained, the usage is minimal (each post takes about 30Kbyte) and no compression is required. SVN is a very easy and efficient backup system for the documents generated for the blog, with the additional benefit of universal access from any web client.

No tags for this post.

Comments on this entry are closed.

Previous post:

Next post: