If you own a website it's imperative that you always keep backups of everything that's on your server. Technology failures and website data loss events happen all the time whether it be hardware or software based. As time has moved on and we often have huge databases running our websites rather than a few static HTML pages this process has become even more necessary. This post is divided into two main sections, the prevention & the cure. Some of this may sound a little technical at times but bare with me, there are solutions for every experience levels.
Website Data Loss: The Prevention
There is no better way to protect yourself from these failures than prevention. You should always keep all of your online files backed up locally and even on other online networks. A couple of few great places to back up your files depending on your requirements are:
- Gmail Account – If you run a blog or have just a few small files then this can be a great low cost option. There are plugins that can automatically email your database backups and everything else can be mailed accross in an instant.
- Your Hard Drive – When you are constantly working “in the cloud” you can often overlook the fact that you have a huge amount of storage space literally at your desk. Make a habit of keeping a copy of everything that you create for your website even if it's created solely online. To make yourself even more bullet-proof you can ever have your hard drive automatically backup elsewhere.
- Amazon Web Services – I would like to note that this is definitely not for the newcomer, however it's worth mentioning as there are many backup options that tie in quite nicely with the variety of services offered by Amazon. I'm only just scratching the surface with their solutions but already I love it.
As I mentioned above there are even ways to automate a lot of your backing up so you are always secure even if you're not consciously thinking about it at the time. A good example of this is the WP DB Backup if you are running a WordPress blog. However even the best backup systems have the potential to go wrong even if it's through human error and that's where the next section of this post comes through…
The Cure
You get online and see that the nightmare scenario has actually happened… Your website is covered in database errors or even worse, you no longer have a website at all. This can be a terrifying situation to be in and no matter how much work you've put into a project, this is the very last thing you want to see. I'll ask you to put away the noose however, it may not be the end of the world yet…
With some of the more simple database failures it could be that your site hasn't actually vanished and the data isn't gone, it's just hiding. I've had it happen before where a my WordPress blog would load as a blank page whatever I tried to do. After the initial panic and a little more research I managed to discover that the problem was caused by something I'd installed onto the blog a day before and it was possible to just disable the new plugin via the database.
No, my site has definitely disappeared…
The first thing you will consider is if you've made backups at any stage. If so, are they recent enough that it's an option to just roll back a little while and just miss a few of your more recent updates? It can be disappointing to lose your recent work but often it can work out a lot easier and cheaper in the long run.
If you have no backups whatsoever, you may try contacting the company that actually host your website. Often your host will perform regular backups so that even if you have not backed up a single thing they will have a copy somewhere. The trouble with this solution is that it can often be costly and you cannot guarantee that they will have everything you need.
The final things that you can try as a last resort and I really mean as a last resort is this; Nearly all search engines these days will create a cache of your website to make their life easier. This basically means that they hold a copy of all the websites in their database for a limited time so that they do not have to actually query every site each time a search is run.
Now in many search engines you will often find that there is a little link at the bottom of each result that is called ‘Cached'. When you click on this link you are taken to the search engines copy of your web page which can often be a couple of days old depending on how often they refresh your site. What this means for you is that you can run a search for your website in all the major search engines and collect the cached files of your website and replace it from these.
You can find a pretty comprehensive list of the search engines that keep a cache here. Before you get too excited though, please bare in mind that this will be a very labor intensive method depending on the size of your website and you are almost guaranteed to not find everything that was on your site before the crash. As a last ditch effort though, it can take away some of the pain of losing your site and help you to get back on your feet a little quicker.
Armed with this information you not only have the power to pick up the pieces on a lost website, but ultimately protect it in future. As always the best thing that you can do in any situation is backup in advance and with the ideas provided here you should be easily on your way to turning your next disaster into a minor set back because it's not a question of if, but when…
Originally posted on Daniel McClure's Personal Blog June 19th 2009