Wednesday 14 October 2009

Getting Your Deleted Blog Back

Ok for whatever reason your blog has been deleted. It then dawns on you that you don’t have a back up to fall back on. Don’t worry all is not lost.

Using Google Reader

Hopefully you are subscribing to your own RSS feed in Google Reader, and that you are posting the complete post to your RSS feed and not a summary. If you are doing both then getting your content back is going to be really quick and minimum effort.

Google Reader doesn’t just allow you to read RSS feeds that you subscribe to, it also caches the feed and archives it. That’s why when you scroll down when reading the feed you can read all the previous posts of that feed.

It’s this caching and archiving that we are going to be making use of now to get our deleted blog posts back.

In an web browser enter the following URL in the address bar:

http://www.google.com/reader/atom/feed/FEED_URL?r=n&n=NUM_ITEMS

Replace the FEED_URL with the feeds address, and replace NUM_ITEMS with the number of posts you want to retrieve.

Here is an example that retrieves the last 100 posts from my Outdoors Blog Whitespider1066.com:

http://www.google.com/reader/atom/feed/http%3A%2F%2Fwhitespider1066.com%2F%3Ffeed%3Drss2?hl=en?r=n&n=100

What is returned is an ATOM/XML file that you can save to your local hard disk. This file can then be imported into your blogging software and thus restoring your lost blog posts.

Using Google Cache

Ok the above Google Reader way was the easy option if you met the conditions I mentioned at the start of it. The remaining ways require effort. This particular way is also useful if you have any static pages you want to recover as well.

Hopefully you haven’t banned Google from crawling your blog. Which means that Google has indexed your blog. So what we need to do is find out what Google has indexed. We do this with the following command in the Google Search box:

site:NAME_OF_BLOG

for example:

site:whitespider1066.com

gcachescreenshotYou then get a list of entries that Google has indexed. Below each entry found is a link to a cached version of that entry (see screen grab left). Click this and it takes you to that cached copy of the post.

If there are images on the page, you can right click and “save as” these if you don’t have a back up of them already.

Next you need to view the source code of the cached page that you are viewing. Select the code that starts with the title, and finishes with the close paragraph tag. Copy this, and then paste into a text file.gcachesrcshot

Repeat this process of viewing the cached copy, viewing page source and cutting and pasting for each of the posts/pages you want to recover.

I’m assuming a Wordpress blog from this point on. Log into your Wordpress blog, and go to the Write Post screen. Copy and paste from the text file the title of the post, then switch from “visual” mode to “code”. Then paste in the rest of the  post, starting with the paragraph tag that opens the post and the stopping with the end paragraph tag that the post finishes with. The benefit of doing it this way is that it keeps any links and images intact without having to redo them.

Finally the timestamp can be set in Wordpress using the Post Timestamp option to that of the original post. That can be found between the title and and the post content that we have cut and pasted.

Now you have to repeat this for each post. See how much more effort this is to just getting the RSS feed cache from Google Reader. I bet you wished you had posted the full post now.

Warrick

warrickscr

I’ve not used this option, but it is a third way that seems to automate the process of getting the copies of your blog/website from the stored caches from several sources. Having not used it I can’t say how easy it is either in getting the data back up either. But having said that it’s worth checking out when your back is against the wall.

Here is the link to Warrick.

Of course all of the above does not replace doing regular backups of your blog.

3 comments:

Litehiker said...

Thanks for that Darren. I'd never given a thought to backing up my blog. Have now done so.

Alan Sloman said...

Exactly the same thoughts as Litehiker - never thought of doing it - perhaps when you are down nice and I ply you with beers you could show me how?

Not sure I wouldn't end up deleting the thing myself, the techie genius that I am....

Darren Christie said...

Alan, no probs. Who is your blog with?
May write another piece on how to back up your blog.