Blog Progress

The hard disk that my old blog entries live on (along with a few other web sites) is still looking rather ill. It’s apparently possible to prod it in a certain manner and get it to work for a few hours until it gets tired again. The hard part is persuading the tech support people at the hosting company to perform the prodding ceremony.

As a result, I seem to be getting three or four hour’s access to it every four or five days.

Last night it came back again and I used the time wisely be getting a dump of the database that contains the blog.

So I now have a backup of all of the previous entries together with the comments and trackbacks (remember trackbacks?) The next step is to get them into my new blog’s database.

Now there’s a slight problem there of course. I assume that the new blog entries will have been generated with the same primary keys as the first few entries in the old blog. And as there will be a unique index on the entries table I can’t just load the old data into the new database.

Currently I’m thinking that I should update the primary keys in the new database[1] so that they are greater than any of the old keys. But the Movable Type database is a large and complex beast. There will almost certainly be more than one primary key sequence to deal with and a large number of foreign key relationships to keep in step.

Sounds like a lot of fun. But it should be a reasonably mechanical task so I think there’s a good chance that I’ll have anything back by the end of the weekend. Don’t hold me to that though.

Is there anyone reading this who has attempted something like this before? Am I mad to do it the way I’ve described above? Is there a simpler method?

Any advice would really be appreciated.

[1] Thereby breaking one of the fundamental rules of database design – primary keys should be immutable.