How Google’s cache saved my bacon

The other day I was doing a bit of spring cleaning on my database server, I run frequent backups on database for client sites but I have a few that are hosted on their own server and they require me to connect via a VPN so I’ve no automated way of accessing the data.

I use my database server during the construction process of sites so I have a copy of all these client databases on my server too. I decided to make an up to date manual backup from one of the client databases over to the version of my database server. So I connected via the VPN, did a Data Transfer using Navicat and copied the client database over to my server and all was well.

All was well that is until the next day when I get a call from the client wondering what had happened to the site, it had suddenly gone back to an earlier version of the site complete with ‘Lorem Ipsum’ gobbledegook text and all. Immediately alarm bells were ringing in my head and the dreaded realisation came over me that I had somehow screwed up the database!

The alarm bells were right, it soon became apparent that the client site had been connected to my copy of the database ever since it launched. So rather than update their own database when they edited the site they had in fact been updating the copy on my server, so when I performed what I thought was a backup of the latest data from their server to mine I had in fact overwritten the data with 4 month old content! Even worse, I thought the site was connected to the client’s database server so I hadn’t had any backups running for the database on my server. So I had overwritten the database and I had no backup! Doh ;(

Google’s cache to the rescue

After panicking for a few minutes a solution came to me – maybe I could get the pages out of Google’s cache?

A quick Google search and I came up with a blog post titled “Easier Google cache hacking“, this posted showed that it was very easy to access pages in Google’s cache:

http://google.com/search?q=cache:www.suburbia.org.uk

Thankfully I was able to find every page of the client’s site that was no more than a couple of weeks old, fortunately the site hadn’t been updated much in that time so it was pretty much up to date. I simply saved out the HTML source from the browser for each page in the cache, then copied and pasted the content back into the database. I then made sure that the client site was pointing to their own database and not my server!

So, a major disaster was averted thanks to Google’s cache!

~Rick

One Reply to “How Google’s cache saved my bacon

  1. Your face went from utter terror to warm self satisfaction in the space of a couple of minutes. I tell you what dude – well done for thinking of that!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.