Fixing broken MT links after server move/database crash
This entry is for anyone who's tried to move their MovableType installation or had their Berkeley DB crash and discovered that once they resurrect their blog, all of the URLs for their entries have changed. MovableType 3.0 fixes this problem by changing how URLs for entries are created, but their are plenty of people out there who still feel the pain (MovableType 2.x users may wish to innoculate themselves).
meta's database crashed a couple weeks ago, which means that a lot of her older entries were no longer displaying properly nor were comments working properly on those older entries, so I wrote a quick script that is similar to the innoculation technique above. This script can be used to 'fix' broken links after a Berkeley DB crash, or it can be used to move your entries from one server/host to another. It requires that you have the old monthly archive pages pre-crash/move, and once it's done it creates a single file that you have to upload to your Web server. That's it.
I've included the source code of this program in the full entry, but I don't expect people who find this entry to know how to pull apart the code, because if they did, then they would probably be able to write it themselves, so feel free to leave me a comment if you find yourself in a situation similar to the one described here and I'll tailor it to your needs.
I mostly did this because it took less than 30 minutes, and I really need to practice my python.
Continue reading "Fixing broken MT links after server move/database crash" »




