Managing your website source code - my method to avert madness (and lose your stuff)

Posted on: 21st Jan, 2011 in Web development,

Whether your website is large or small it is more than likely worth a lot to you and your business. I this article I will detail how I, if you are a client of mine, look after your site by using source code management and various backup plans.

Image to support this Managing your website source code - my method to avert madness (and lose your stuff)

Websites may have thousands of pages of code and databases that power them or they can be wonderfully lean and simple, consisting of only a few static HTML files and a few images. But even if they are simple, don't be fooled into thinking that your web designer/developer shouldn't be keeping backups of files and source code so that in the event of a disaster your site can be restored as quickly as possible.

Your project files that are held locally

Things you send me (content, images, etc.) are held in multiple locations and backed up in various ways.

  • Laptop hard drive
  • Back up drive with two mirrored hard drives (so if one fails the other will be intact)
  • Further back up drive which is a complete mirror of my laptop hard drive
  • Further back up which keeps each version of the file so that if I make changes and delete something important I can bring it back from the history)
  • Off-site back up using a service called Dropbox (they store multiple versions of each file on Amazon infrastrucuture and also version control each file so that if I make changes and delete something important I can bring it back from the history)
  • Off-site back up using a service called JungleDisk (which stores my files on Rackspace infrastrucuture, again keeping old versions)

Your website development files that are held locally (and remotely)

  • I develop your site locally, so it makes use of the same back ups as described above
  • I also manage the code and files that make up your site with a Source Code Management (SCM) system called… git. I know, slightly rubbish name but it is very powerful. In a nutshell, it means that every change I make to every file is described and written down in fine detail, so that I can go back to any version I need to, even if it was five years ago that I initially developed your site (assuming I was using SCM then).
  • As well as keeping track of the files on my local hard drive, the original repository (or place where the master files are stored) is part of a commercial web application called Beanstalk. This means that there is always another version of your site files off-site, and they have their own spectacular back up and disaster recovery plans.

Development and staging server

The next place your website goes to is a development server. This is where I commit changes to regularly from my laptop so that I can (a) check that it works on a real-life web server (i.e. not just my cosy laptop) and (b) give access to other developers if they are working with me on the site.

  • The files on this server are backed up to the same server if anything minor goes wrong
  • The files on this server are also backed up nightly to a separate server in the same facility.

The place you will spend most of your time looking at your site before it is launched is what I call a staging server. This is on the same server as the development server so is covered in the same way.

Live server

The real deal, what your customers and prospects will see and where you will make changes to your site on a day-to-day basis.

  • This server is hosted on Rackspace Cloud infrastructure. It is hosted on multiple servers so that if one fails another will pick up. It is also designed so that if you have a massive spike in traffic to your site it dynamically grows to cope. The files are backed up as part of Rackspace’s disaster recovery plans. I also run scripts to keep back ups of the files on my home network (see above back up methods) and also on Amazon S3 and also on Joyent, who provide my development server.

So basically your site is everywhere! And I provide all of this for free as part of my service to you. Aren't I nice!



Email (required, not displayed):

URL (not displayed):

Your comment:

Please don't make me type in my details again.

Let me know if anyone else comments.

Please enter the word you see in the image below:

Request a quote

Let's start talking about your project. Just send an enquiry in via the contact page or call me on the telephone and we'll take it from there.


Email Newsletter

Why not subscribe to my email newsletter containing latest news and tips? You can unsubscribe at any time and your details won't be passed on to any third-parties.