12 February 2009

Blogging Tips : Testing Your Blog Backup

In this guest post, Neil Matthews of talks about the importance of testing your blog backups.

I want to pose you a question. Have you ever tested your blog backups?

We are constantly told to backup our computer systems in case of crash or corruption. Anyone who has lost a store of precious digital photos knows how important this process is.

Bloggers are well aware of the need to backup their content, but what use is a backup, if, when you need to recover it, you find that it is incomplete, corrupt or you don’t know how to restore it?. This post will hopefully encourage you to test your recovery process.

The rest of this post has a definite WordPress bias, but the underlying message can be used for all blogging platforms.
Why Test Your Backups?

You may feel that once you have setup a backup process for your blog you can sit back and enjoy a virtual safety net. If you have a good process in place why should you test it? The three reasons to test are validity, integrity and knowledge.

Validity - are you sure that all of your blog is backed up? You need to test that all of your data is being added to your archives. Blogs are not static, you may have added a plugin which creates new data, but is your archiving process configured to save this?

Integrity - are you sure that the archive file is not corrupt? It may be that in your hour of need, you cannot recover what has been backed up.

Knowledge - another reason to test your backup is to ensure you know how to perform a recovery. It is all well and good to have a plugin sending you a daily email with a database backup, but do you know how to untar the file and load this into MYSQL? Testing your backup will show you the gaps in your knowledge. This will give you the chance to gain the skills so you can recover from a blog failure.
What To Recover

Your must be able to recover two things to have a successful backup recovery test:

Your database contents; posts, comments, tags, catagories and misc. system settings. With WordPress this will be a MYSQL database. The second thing that will require recovery is your code base or the WordPress files you uploaded to your hosting platform. You may think that having a copy of your latest wordpress files held on your laptop are enough to recover your blog’s code base. Whilst this is a good starting point, you are ignoring the non-static area of the code base, the wp-content directory. This contains your plugins, themes and any media you upload to your blog such as images or video. Do you remember what plugins you installed or what changes you have made to your theme. You need to backup and, in turn, test the recovery of your code base.
When To Test Your Recovery Plan

As a rule of thumb, you should test your ability to recover before any major change to your blog, including:

* Before WordPress updates
* After you have developed some high quality content which is generating
* traffic and will cause tears if lost
* Importing or Migrating a large amount of data
* Extending your blog with third party products such as forums
* At least once a year if any of the above do not occur so you know your
* backups are working correctly

How to Test Your Backups

There are two ways to test your backup, the easy but highly risky method, and the difficult but risk free method (who said blog maintenance wasn’t high tension stuff).

The easy but risky method - restore your backup over your existing blog, this is easy because no additional configuration is required and you backup should simply drop into your database/file system. This is highly risky of course due to the nature of the the process, you don’t know if you backup works, but how do you test it? If your backup does not work the restore will bring you perfectly running blog to it’s knees. Another classic chicken and egg scenario.

The difficult but risk free method - build a development blog on your existing hosting platform and restore into this . This will vary from hosting provider to hosting provider, and will require a certain amount of technical knowledge (which is beyond the scope of this post). You can create a new domain, a second installation of wordpress in another directory on your existing domain or even build a blog on your own PC with apache, MYSQL and PHP. It is difficult because it requires a certain level of technical expertise, but it is risk free to your current blog because you never touch it.
In Conclusion

Test your backups frequently so you know what shape your archives are in. As a parting note picture this scene. Your blog and possibly your income steam is down. The faster your recover the sooner you will be blogging and earning again, test your backups!

No comments: