December 11, 2004

Moved web host

My web host is shutting down my old server and so I had to move to a new server. It's much faster, the administrative service is much nicer, and it supports SSL, but moving is always a pain.

The process includes setting up lots of configuration info on the new server to match the old one. I have almost no config, but I still had to figure out what it was then re-do it. Then I copied all my files over, thankfully made easier because the old server generated a backup archive every day which I could download.

The hard part was Movable Type. The old server had only Berkeley DB, the new one on MySQL. So I exported all my entries with MT's export functionaly, then had to configure a totally new install of MT on the new server and import the entries. The config, again, was a pain but straightforward. Import worked perfectly, except for one thing: URLs. I care that my old URLs are the same on the new server. Well, it turns out that MT uses the ID column in the database to generate its archive URLs--a decent idea, but not portable across servers. So here's the process I used.

1) Export all old entries.
2) Review titles of old entries sorted by ID order--I had a huge gap in the middle when I imported old entries from another system, so I had to re-order the exported data so that instead of being sorted by date (MT export does this sensible thing), it was sorted by ID. Luckliy this was one huge chunk plus about 3 transpositions, but it's still a PITA. If I had to do this again, I might automate it, but that would take longer than just doing it the first time.
3) Test import. Review results and notice that there's 2 gaps which need to be fixed.
4) Fix them in the import file and notice that everything is now wrong--the IDs kept growing.
5) Go into the MySQL administrative tool, drop and re-add the entry table. Thankfully there are no foreign keys.
6) Re-import. Everything was fine.

One nice thing about MT import is that it pulled in my categories, at least well enough to use. It also somehow got most of my templates, they must have been stored in the filesystem, and when I used the same name, everything matched up.

Hopefully I won't have to do this again, or if I do it will be to something which has better support for this process. At least I hope MySQL data is more portable than BerkeleyDB data.

Note: I spoke too soon... the comments got imported strangely. And the templates didn't get imported right either... now that's all done.

Posted by MBlain at December 11, 2004 04:23 PM

Yay for blogging! I've wanted to look at Moveable Type, I went with a php based blog (b2) for mine.

Posted by: Kevan Emmott at February 5, 2003 08:26 PM

I would have not needed to spend so much time if I didn't care if the site was identical to before... plus my old templates weren't 2.66 templates, my new ones now are (except one I overwrote with the old one by accident, I'm not going to fix it now).

Posted by: Matthew Blain at December 11, 2004 05:20 PM

Wacky that my comment came along with this post... That was from WAY back (2003).

Have you had any bad comment spam? I've been seeing a TON of MT blogs get hammered lately.

I'm currently on Wordpress, which is quite nice.

Posted by: Kevan at December 17, 2004 09:18 PM

Ah, well now I see your comment-blocker, that should help, definitely.

Posted by: Kevan at December 17, 2004 09:19 PM

but be QUITE annoying for frequent commenters :-)

Posted by: Kevan at December 17, 2004 09:19 PM
Post a comment

Remember personal info?