For many years I've been running Movable Type on my own server. However, the excitement of performing regular updates of the software to keep it updated with the latest features and security patches has been lessening. In addition, the recently released Movable Type version 5 has deprecated SQLite database support in favour of MySql. Not being keen to move to a database I consider less suitable for my needs, I made the larger transition to Blogger, a blogging platform hosted by Google in the "cloud".
Moving my data was surprisingly easy. A quick trip to Google's Data Liberation Front led me to the google-blog-converters-appengine, an online tool that converted the blog data as exported from Movable Type into a format acceptable for import into Blogger. This ran quickly and without error.
Traps for the Unwary
1. Faulty timestamps
The Movable Type export facility is not a full backup of the blog, and does not export timezone information. Instead it just provides the local time of posts. Without modification this will then display as the wrong time when imported into Blogger. The easiest solution is to do a simple search-and-replace of the timezone data within the file to be imported. In my case, I replaced the "Z" suffix of my timestamps with my local timezone of "+08:00", such as "2010-02-01T16:58:05Z" with "2010-02-01T16:58:05+08:00". Fortunately, as there is common text nearby you can do this in the obvious manner with your favourite text editor rather than requiring regular expressions.
2. Changed URLs
Movable Type publishes its single page posts under the /archives/ folder,
e.g. http://blog.chaucery.com/archives/2010/02/sangean_dpr-34.html,
whereas Blogger uses the better location of
http://blog.chaucery.com/2010/02/sangean-dpr-34.html.
In addition, as you can see from that example, spaces in post titles are converted to lowercase by Movable Type but to underscores in Blogger. These differences mean that, unless fixed, existing links to my individual blog pages will break.
A third change to URLs was that direct links to searches are quite different:
MT: http://blog.chaucery.com/cgi/mt-search.cgi?IncludeBlogs=1&search=sangean
Blogger: http://blog.chaucery.com/search?q=sangean
Luckily, when using a custom domain as I am, Blogger offers the option of using a missing files host, whereby if someone attempts to access a blog page that does not exist they will be redirected to a different subdomain. I opted to redirect them to my main www.chaucery.com site, where I have a custom PHP error 404 page to cope with the changes. The sample below shows how I fix the URL to match the new Blogger archives format before redirecting them back to my blog transparently (I haven't shown the change required for the search URLs).
$oldUrl = $_SERVER['REDIRECT_URL'];
if (strpos($oldUrl, "/archives/") !== false) {
$trans = array("/archives/" => "/",
"_" => "-"
);
$newUrl = "http://blog.chaucery.com" . strtr($oldUrl, $trans);
header("Location: " . $newUrl) ;
exit;
}
The rest of the blog move went well. I was surprised at how much control Blogger gives over the style of the blog, such that I could practically duplicate the look of my old blog. All in all, it looks to have been a success.