Backup and Recovery: An Introduction

Ongoing WordPress Support

Do You Need Help With Your WordPress Site?

Click through to the next page and learn more about our ongoing WordPress care plans.

Date

How to backup and recovery your wordpress site, an introduction.

In a series of blog posts, I would like to take you through the process of backing up, and then recovering your WordPress blog.  I will look at why this process is so important, all of the components required to make a full backup, how to do a backup, then I will look at the most important aspect, how to recover your archived data and files.

The first part of this tutorial takes you through an introduction to the backup and recovery processes.

Why Do I Need A Backup?

Computer systems go phutt on an all too regular basis, having a backup allows you to rebuild your blog with the minimum effort.  Consider the time and effort you have put into developing your posts and your cool theme,  how many people have taken the trouble to leave a comment and the links you have built up on Google, all of this needs to be archived so you can recover it in the event of a catastrophic failure, hacking attack, hardware failure or user error.

If you have to recover your blog from scratch without a backup, this will take a huge amount of time (time equals money) , you will loose a lot of your blog’s traction and any authority you have built with the search engines may be affected.

Take a moment to work out the cost to you or your organisation if your blog fails and cannot be recovered quickly.

What You Need To Backup

There are two components you need to consider when doing a WordPress backup, the data in your MYSQL database and what I call the filebase or the files which make up a WordPress install.

The database is commonly backed up by most people, but who considers their filebase?  The filebase includes all of your uploaded media (images, video, podcast etc), your theme, your plugins and the files which make Wordporess run; the scripts and configuration files.

A partial backup of only one of these components is of little use, you need to backup both.

How Often Should You Backup?

The frequency of your backups should be done in line with how often you update your blog, if you write posts daily, backup daily, if you are uploading lots of media, backup the filebase frequently.  Do it often, and do it early.

My preference is once daily for my database and weekly for my code base.

You should also perform a backup before any major change to your blog.  You should backup before you update the code, add plugins, change the theme or add a third party product such as a forum which will share the same database.

Keep Multiple Copies of Your Archive

Having multiple point in time backups allows me to restore to a particular period before my failure happened. If you only keep one archive you may reimport the problem when you do your restore.

An example is probably helpful here. Imagine your blog has been hacked on Monday and rogue code has been added to your site, then imagine you only notice the hack on Wednesday, your single point in time archive from Tuesday will still contain the rogue code from Monday, you need an archive from Sunday to sucessfully recover to an operational point in time.

A good example of a retention policy is to keep a weeks worth of daily backups, then to keep four weekly backups.  This means you can recover up to a month in the past.

Archiving My Backups

If you keep all of your archives on your local hard drive, there is a change you could loose these, I recommend you archive your archives.  This can be done by copying your data sets to cd, or to an online service such as Google docs.  Just make sure you have  an archive you can recover from if your pc or mac crashes.

I use Gmail as a sneaky way to archive my backups, I have setup a rule to move my backup files directly to a storage area  automatically, this means I have a number of checkpoints with my backups so I can do a point in time recovery.  I use plugins to send me those emails, I will explain more about this in the backup plugins section later in this course.

Testing Your Backup

It is all well and good having a backup, but have you tested your recovery process, I wrote a guest post on Problogger about this subject, check it out at http://www.problogger.net/archives/2009/02/12/testing-your-blog-backup.

What’s Next in the Series?

The rest of this series is much more practical, I will take you through backing up and recovering your system.

Backing up the file base and the database manually

I will show you how to manually create an archive of your file base, or the files which make up your install such as wordpress scripts, theme files, plugin files and any media you upload such as images or video.

I will then move onto backing up your database.  This is where your blog content is saved your posts, paghes, comments, tags categories and the variable data which allow syou system to run such as user information, plugin configuration or blog options.

Backup Plugins

I have shown you how to manually back your database and file base, this is an important learning process to understand what is required for a good backup, but manual backups are not very efficient, I will move onto a section on using plugins to automate your backup procedure.

Recovering The Files and Database

I was once told by a system administrator that you are only as good as your last backup, I agree, but add the caveat, you are only as good as your last backup your know how to recover.

The last parts of this tutorial will show you how to recover your two types of archive.  This is often overlooked.  Having the knowlege to recover your blog when it has crashed is very important.

Discuss this Post

If you would like to discuss this topic, please  leave a comment

Next In the Series

The next part of the backup and recovery tutorial looks at backing up the code base.

Ongoing WordPress Support

Do You Need Help With Your WordPress Site?

Click through to the next page and learn more about our ongoing WordPress care plans.

More
articles