Tuesday 20 October 2009

Backing Up That Wordpress Blog

Well I suppose this could be considered the last in an unintended series about backing up and recovering a blog, with a specific focus on Wordpress.

In the first part I covered recovering a deleted blog when no back up existed. While the second part talked specifically about how to get the Google Reader ATOM file converted so it can be imported in to Wordpress.

In this last part I am going to concentrate on backing up your blog, specifically Wordpress because that is what I use.

In the first part one of the recovery methods relied on you having subscribed to your own blogs RSS feed in Google Reader. It also relied on the full post being in the RSS feed and not a summary. So this is our first way of backing up our Wordpress blog. This will also work with any other blogging platforms, so is a nice general tip.

Now Wordpress should adapt the iPhone ad campaign to say “there’s a plugin for that” (thanks Duncan for that quote). Because by installing the WordPress Database Backup plugin you are then able to backup the important Wordpress database tables for your blog. Not only that you can schedule the backup to happen on a regular basis and have the backup emailed to your inbox.

The third and final backup method we will use is to back up all our Wordpress files. To find out how to do that pop on over and read “Automatically Backup Your WordPress Site”. Now this will only work with self hosted Wordpress blogs where you have FTP access to your files. Although this would work with any blog platform where you can get FTP access. So potentially a nice general tip. This will also work if you want to back up a website to.

So there we have it use these three methods and you should be covered if anything goes wrong. Just make sure you keep multiple copies of the back ups and at least one of them offsite (maybe use something like Dropbox, or Live Mesh).

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.

Friday 2 October 2009

The Little Photo Lab On Your Phone

I wrote the following post for my blog whitespider1066.com but thought it may be of interest and totally suitable for the readers of here as well. I’ll apologise for those that read both for duplicating the post.Oh there is a difference for some reason WLW and blogger don’t like me posting images! SO I have had to remove the screen shots that I was able to post over on whitespider1066.com.

Roger in the comments on the post “The Best Camera” asked me what iPhone apps I used to generate the photo that I posted. I thought that this would be easier to answer with a blog post than with a comment. Well I wanted to break up the OTS coverage, and to post a couple of screen shots from the iPhone. Any ol’ excuse to be geeky really.

The iPhone I have is the 3G which has a 2 mega pixel camera, unlike the 3GS which has a 3 mega pixel camera that also shoots video. The other difference is that the camera on the 3GS also has an auto focus, plus you can also select the area to focus on by touching the point on the screen. So those with the 3GS should be getting better results than I can with my 3G.

The iPhone has some great apps to allow you to manipulate photos while away from your pc/Mac. Which makes it really useful when out on the hills or doing a multi-day hike to live blog and attach images to the post.

After taking the photo using the camera on my iPhone I then load the photo into Photogene. Photogene costs £1.79 from the App Store, but is a very handy power packed tool. For starters it allows you to crop and straighten a photo. Plus enhance photos with multiple colour adjustment options and a sharpen filter. You can also add effects like text balloons, frames or special filters.

So using Photogene I cropped the photo, used the auto colour correct, and applied a frame to the picture (in this case the sticky tape on the corners).

The resulting picture I saved and loaded in to Collage Lite. Collage Lite is the  free limited version of Collage. Lite versions are the way you get to try before you buy in the iPhone App Store world. In Collage Lite the limitations are that you are limited to four photos and that you don’t get the crop functionality. At the moment the Lite meets my needs, but the full blown version is only 59p so like a lot of iPhone apps not going to break the bank. So using Collage Lite I assembled the photos to make the simple collage that you saw.

As I commented on the blog posting I just thought that it would be a fun way to present the photos that I had taken on the iPhone. We need to have fun sometimes.

So there you have the two apps that I used for the picture I posted. However I have a couple of other apps that I use as well. The first app is Pano. This app allows you to take panoramic photos using the iPhone and costs £1.79 on the App Store.

So as you can see on this post I have screen shots of the iPhone. How did I do them and get them on my netbook so I can use them in this post?

To take a screen shot on the iPhone quickly press and release the Sleep/Wake and Home buttons at the same time. A white flash of the screen lets you know the screenshot was taken, you will also hear an audible queue as well. The screenshot just taken is then added to the Camera Roll on your iPhone. Simple and very handy.

I then had to get this onto my netbook. Sadly my netbook does not have iTunes on it, and I only sync my iPhone with my Macbook anyway. So how to transfer files? Dropbox that’s how. Dropbox gives you 2GB of free online storage, and they have just released a free iPhone app. So with a small install of the Dropbox software on my netbook and creating a free account I was able to sync the photos quickly across from the iPhone to the netbook to be used in this post.

CropForFree is a free app that allows you to crop an image. It is a new one that I have recently downloaded to have a  look at. But with cropping already in Photogene and in Collage (if I buy full version) unless this adds something really special I can see this one being deleted from my iPhone. But still a handy one to know about if you want to crop without splashing out any cash.

Another app I have just downloaded is NoiseBlaster at 59p. It’s by the same author as Photogene, so it has a good pedigree. As the author describes it “NoiseBlaster implements an advanced algorithm, specifically designed to remove the noise created by the iPhone camera”.

So I hope that answered your question, and I haven’t bored you.