This website covers topics on knowledge management, personal effectiveness, theory of constraints, amongst other topics. Opinions expressed here are strictly those of the owner, Jack Vinson, and those of the commenters.

Repairing MT after db corruption

I am running Movable Type under the default berkeley database, and that db got corrupted.* I was able to get things working, but it still wasn't perfect. Besides the annoying error messages at the bottom of many windows (comment posting, for example), comment spammers were still hitting my database with new junk for entries that had been purged (mostly - they didn't all go due to the corrupt database). **

For entertainment and documentation, here's what I've done thus far:

  1. Save all current settings for all blogs in this setup. I'm running two blogs with a third operating as a backup for another site. Export all the entries, save that file. Then make copies one-by-one of each template. Copy down the weblog config settings (or maybe just copy mt.cfg). See below for more automatic ways to do this.
  2. Attempt to delete what seem to be the offending entries in my blog. No luck.
  3. Delete the entire blog that is offending. It doesn't completely go away due to that database corruption.
  4. Create a new blog with the same name and copy templates back.
  5. Import all the entries from file created in step 1. Get annoyed that some trackbacks are invalid and cause the import function to crash. Get annoyed that one entry seems to be corrupt in some other way and no longer displays properly. It can't be deleted. I may have to go through this whole process again.
  6. Update configuration settings for slightly better sight layout.
  7. Rebuild the new blog. Hey it works okay.
  8. Use mt-medic to see that the original blog is still there. Reset permissions and see that MT managed to delete about a third of the original content. Delete the remaining entries through the edit entries interface.
  9. Fix linkrot (bad links due to new archival settings). I found the judicious use of .htaccess and its RewriteRule to be a godsend. This lets me tell the web server to serve up my Weinberger at Seabury article when users try to access my first posting by its original url, for example. I have only specifically redirected for articles that have been pinged or that I have self-referred. For all other posts, the .htaccess directs users to a KJolt has been rebuilt page that encourages them to go on a searching spree. Monthly and catalog archives are redirected nicely too. Mar has some useful pointers on future-proofing url's in MT
  10. Still need to find out how to fix that bleeping database.
  11. In the meantime, consider changing hosts and blog software.

Automating Backup:

Other Notes
* MT database choice: Everything I read recommends use of the MySQL database instead of the default Berkeley database. I may have to suss this out. Howard Abrams has some instructions and scripts for moving from Berkeley to MySQL.

** Comment spam: This tells me, by the way, that comment spammers are relying on numbered entries in the archives / database and hitting them more-or-less randomly via some kind of automated script. They were hitting posts that I had removed from my archives directory, but still existed in the database (due to the corruption). Now that I've cleared the database of those dead entries, they shouldn't be able to spam articles that don't exist.

More on email management

Task slippage isn't the point