Showing posts with label blog recovery. Show all posts
Showing posts with label blog recovery. Show all posts

Tuesday, 20 October 2009

Importing That Google Reader Atom File To Wordpress

Ok so in my previous post I told you how to get your blog posts back if for whatever reason you deleted your blog. In that post if you went the Google Reader route you ended up with a ATOM/XML file.

Sadly Wordpress in both forms (Wordpress.com and Wordpress.org) will not read this ATOM file. But it is possible to get it into a format that can be read by them.

Firstly you are going to have to visit a couple of places on the web and download a couple of things.

The first thing you need to do is download the atom2rss.xsl (from Atom conversion tools). Store that in the same directory that your ATOM file is stored. Next you need to visit the Microsoft site to download msxsl.exe (get from here), and also save this in the same place as the other files.

Now you will have to open a command prompt up and change to the directory where you have all the files stored.

From the command prompt type the following:

msxlr.exe –o OUTPUTFILENAME.RSS ATOMFILENAME atom2rss.xsl

where OUTUTFILENAME.RSS is the name of the new file we want to create

and ATOMFILENAME is the name of our ATOM file containing all our blog posts.

If all has gone to plan then we should have sitting in the directory a file with a .rss file extension.

Now if you have a self hosted Wordpress blog, all you have to do is login, go to the Dashboard. Go to Tools, Import, click on RSS locate the .rss file created and that’s it. You should now have all your old posts loaded back into the blog.

For a Wordpress.com blog you need to do some extra steps. Sadly for whatever reason Wordpress.com does not allow you to import an RSS file. See nothing is ever easy.

Firstly you are going to have to install Wordpress locally! Now don’t worry that sounds harder than it actually is. Especially if you follow the steps detailed in this excellent blog post HERE.

Once you have XAMPP up and running with Wordpress, log in, go to the Dashboard, go to Tools and Import. Yes this sounds awfully like what the self hosted lot have just done, and it is. So I won’t continue with the steps just read what they had to do.

Now with all the posts sitting there locally on your pc, go to Tools, Export and export your blog posts out as wxr file to your hard drive.

Now log in to your Wordpress.com blog, go to the Tools section and Import and select Import Wordpress blog and follow the prompts.

That’s it, you have you lost posts back up.

Phew!!!

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.