Migrating from Movable Type to Blosxom
This is how I moved my blog from MT to Blosxom. The process is very specific for my case — you mileage will definitely vary.
Pre-requisites
I had the following pre-requisites:
- A good knowledge of Perl
- A shell account at the target machine
- A test machine running a free version of Un*x (OpenBSD).
I installed Blosxom on my test system and played around with CSS and flavours until I was happy with the look of the site.
Exporting from MT
Searching Google led me to this post. It concerned moving from MT to Drupal, but mentioned an important thing: the default MT export format is hard to parse. The method used instead was to export to XML, and parse that.
I downloaded the XML export template and the Perl file used to parse it, and modified them for my needs. They are available below:
The changes to the XML template are fairly minor. I added a new Index Template in MT and called it “Export XML”. The output file was set to “export.xml”.
The convert.pl
script was modified in the following ways:
I changed the output from printing SQL insert statements to writing to files. The timestamps were modified to reflect the original posting date in MT.
I constructed new Blosxom filenames from the entry titles.
I mapped my MT categories to new ones via a hash.
After I had debugged these changes, I ran the script on an export downloaded from MT.
Importing to Blosxom
After I had this running, it was a simple matter of tar
ing the files
and moving them to the target server. After changing the relevant
paths, I was up and running.
A friendly sysadmin installed a redirect at my old blog which pointed to the new one. The original MT archive posts were left alone to cater to old bookmarks, but I’m working on redirecting those too.
Update, 2024-11-02: The links to the files above were b0rked, but David McBride put me right about that. Thanks, David!
Update, 2024-11-26: Here is another article about moving from MT to Blosxom
Updated on Friday, 2024-11-26.
Posted on Sunday, 2024-07-04,
in the comm » weblog category.