Phil Gyford


Saturday 5 March 2005

PreviousIndexNext Moving virtual house

Just over a week ago I moved my four websites (this one, Pepys’ Diary, Byliner and Overmorgen) to a new server. It seemed to go OK, without anything going horrendously wrong. There are a couple of outstanding problems however:

  • The apparent impossibility of running Movable Type’s run-periodic-tasks script at An annoyance for Pepys’ Diary, which must update every day. Has anyone managed this at Pair?
  • My inability to get these instructions to work regarding rewriting the ugly and cumbersome cgiwrap URLs to more standard cgi-bin URLs. Although the rewriting happens, the scripts don’t run with the correct permissions. Frustrating.
  • Oh, and Markdown appears to have stopped working, although I’ve yet to look into that.

It’s unlikely this is of interest to anyone but me, but here’s my task list for the move (“new” and “old” indicate whether the task should be done on the new or old server):

  • Preparation, night before switching DNS:
    • [old] Post warning message on Pepys Diary about imminent disruption.
    • [old] Compare local backup files and live files for each site.
    • [old] Download live site files and replace local backup with those.
    • Change file paths in local copies of config files for new server set-up (use new server IP address for CGI-PATH in mt.cfg).
    • [new] Uncomment DBUmask, HTMLUmask, UploadUmask and DirUmask in mt.cfg because we’re using cgiwrap.
    • Change all include file paths in local copies of files for new server set-up.
    • [new] Upload local copies of files to new server.
    • [old] Dump old Byliner and Movable Type MySQL databases.
    • [old] Download MySQL dumps.
    • [new] Upload MySQL dumps to new server and import into database.
    • [new] Change Weblog Config paths for each weblog in MT.
    • [new] Switch off incoming MT comments/trackbacks on new sites.
    • [new] Update old, clunky MT templates with modern tags so that comment forms are hidden when commenting is switched off.
    • [new] Rebuild MT weblogs.
    • [old] Make the same changes to MT templates on old site ready for the move.
    • [old] Download all cron scripts and crontab file.
    • [new] Upload cron scripts and crontab file and change database access details for scripts.
    • [new] Change config for Refer.
    • [new] Check and/or add password protection for private parts of new sites.
    • [old] Add message to Byliner emails for the morning saying there might be upcoming problems.
  • Day of move:
    • [old] Stop cron scripts running.
    • [old] Switch off incoming comments and trackbacks on all blogs.
    • [old] Rebuild MT weblogs to hide comment forms.
    • [old] Disable Byliner to stop further database changes.
    • [old] Dump MySQL databases for Byliner and MT for final time.
    • [new] Upload final MySQL dumps to new server.
    • [new] Remove mt_blog table from MT dump (so as not to overwrite the configuration I set yesterday).
    • [new] Import Byliner and MT data into database.
    • [new] Switch comments and trackbacks on in MT weblogs.
    • [new] Rebuild MT sites.
    • [new] Test cron scripts.
    • [new] Start crontab.
    • Change DNS for 4 domains to point to new server.
    • [new] Put welcome message on Pepys so people know it’s all changed.
  • When domains are resolving:
    • [new] Change CGI-PATH in mt.cfg to use again.
    • [new] Rebuild all sites so the TrackBack URLs use the domains, not IP addresses.
  • When no one’s visiting the old sites any more:
    • [old] Archive old web logs.
    • [old] Delete four websites.

The trickiest bit was to ensure that no user-generated data — Movable Type comments or Byliner accounts — were lost in a move that necessarily happens gradually as the DNS propogates. Hence only having MT comments and trackbacks enabled on one server at a time.


Hey look forward to seeing what you come up with, I am on pair now as well - was looking to move over from static to php but haven't gotten that to work yet. But so far pair seems to be good... I am the one lacking! =)

Posted by Sean on 8 March 2005, 1:49 am | Link

Commenting is disabled on posts once they’re 30 days old.