Reconstruction

The thing about backups is everyone knows they are critically important. It is like your lungs. You don’t sit around and think about your lungs everyday, all day. Yet, if you loose them, it is pretty much game over #

The quote, ironically, refers to Ma.gnolia, for whom I once created and maintained a wordpress plugin. Pure serendipity – I just searched Google for “the thing about backups” until I found a quote I liked…

But to get to the point, this website was first registered in 1999. Ten years ago. Since then, it’s hosted at various times a static site, a defunct mess, a Movable Type install, Wordpress, a Bloxsom install, an Habari blog, and then finally a return to Wordpress as I realised that it’s very obviously the least-bad blogging engine around at the moment. Even if it is written in PHP.

Sometimes, when I moved the website from one system to another, I kept the old content. Sometimes, I dropped it, preferring to start from a clean slate.

On a couple of occasions, I just started from a clean slate anyway.

Recently, it struck me that I should put the older pages back on the website. I wrote them all for a reason, and they should be on display for the world. I think there’s some surprisingly decent writing in there, if I do say so myself.

So I figured I’d restore as much content as I could. This would be easy.

I just sort of expected to find a bunch of .sql backups tidied away in my Documents folder, of all the versions of the Wordpress databases that have been here over the years.

They weren’t there.

So I’ve spent the past few weeks trawling archive.org’s er, archives, of various incarnations of this website, copying and pasting to restore as many of the original pieces as I could find.

It wasn’t much fun, but it’s done now. Instead of eight articles, there are now 195. 196, including this one.

I haven’t copied the comments, because technically speaking, I can’t.

I could copy the commenter’s name, and the text of the comment, but I can’t see the email address on archive.org, so the Gravatar symbol won’t appear correctly in the reconstructed comment.

I have a cunning plan to address this though – all Wordpress versions of this site have had a feature enabled that sends an alert to my Gmail account. And since it’s Gmail, the mails are all still there.

I think it should be fairly straightforward to write a Perl script that connects to my Gmail account and scans through all my email to find all Wordpress comment notifications, extract the commenter’s Name, Email, Website and Comment Text, and insert them into the Wordpress database at the correct post.

Probably.

I searched Google to see if anyone has ever tried to do something this stupid before.

I could find no evidence of it.

I did find the Mail::Webmail::Gmail module on CPAN. Seems to have been abandoned, with several old but unaddressed bug reports, and doesn’t work for me.

The Python version, however, seems to work. Trouble is, I don’t know Python. I guess it’s time to learn…

This may take some time – I’ll share the code if I get it working!

pixelstats trackingpixel

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Slashdot
  • StumbleUpon

1 Responses to “Reconstruction”


  • In a cruel irony, the site got defaced by some script kiddie this morning. I still hadn’t made any backups.

    I’ve made them now :)

Leave a Reply