15:43 Friday, August 08 2004

craptacular

What a week (or 2) its been. Roughly 2 weeks ago the partition on the server where I host LlamaLand filled up. This caused my attempts to create new posts to fail with frightening errors. When the partition was finally cleaned up, I ended with even more frightening errors when trying to do just about anything (create new posts, rebuild indexes, etc). In hindsight, what happened was that null records were being added to the fragile Berkeley DB (BDB) that I was using each time I tried to post when the partition was full (since there was no room to actually what I was posting). Seems that Movable Type doesn't cope with null entries well at all, and just vomits all over itself. Now if i was using a normal SQL based database, this would have been relatively easy to fix (a few delete sql commands), but BDB seems to only be accessible via assorted programming APIs, and nothing else. So I made a long list of feeble attempts to clean up entry.db, all of which failed miserably. Finally, last night I was at the end of my rope. I didn't want to ditch 16 months of blogging, but at the same time, i didn't know how to fix things. On top of that I was trying to get the hell away from BDB and use mysql instead. While i'm not the biggest fan of mysql, at least its a real SQL database so I can work with it without having to learn any programming APIs. THe problem was that MT's migration script, mt-db2sql.cgi, kept bombing out each time it hit the null records in entry.db. But I stumbled across this comment in one of the MT forums were someone else was having this same problem and instead of fixing the BDB mess, they just removed the 'not null' requirement for the DB schema, and that allowed the import to work. And thank you jebus, it worked for me too. Once I got everything into mysql, i was able to see that i had 4 null records, and I purged them. So now i'm running off of mysql, and life is good again.