Moustache

@#$!: Adventures in server administration

Disclaimer: You probably don't want to read this. It is more cathartic for me than anything else. I apologize in advance for the nerd angst.

If you've stopped by here lately, you may have seen a real nice error message leading you to think I screwed something up real good. Your thoughts would be correct, as I made the mistake of trying to upgrade my MySQL database. Luckily I resisted my natural urge to just plow ahead and backed up my databases before uninstalling MySQL. I used the seemingly helpful "export" tool in PHPMyAdmin, fully expecting to be able to use the "import" tool after the upgrade. That was the plan anyway.

Right after checking to make sure the exported file looked something like a database, I upgraded MySQL. Then for kicks I upgraded PHPMyAdmin too. Finally I tried to import my old databases back into the shiny new MySQL. That's when I noticed that my exported file was over twice the maximum allowed size. Why would PHPMyAdmin allow me to export a file twice as large as I can import? Because it hates me, that's why. I then tried to split the file into two smaller files, when I noticed that I had nearly 2 million lines of SQL from the Bad Behavior comment spam filter (which I highly recommend aside from that little issue). I know there is an easy way to get rid of the lines via the Terminal, but I'm not that smart so I manually scrolled through the whole thing and deleted chunks at a time. This was clearly the least effective way to do this. (Q: How long does it take to delete 2 million lines of code by hand? A: Over 45 minutes) So long story longer, after also screwing up the character type of my backup file somehow, I finally resorted to pasting in sql queries one line at a time. That is how much I care about you, gentle Moustache blog reader.

The best part of the story is this: I upgraded MySQL so that I could install gtd-php, a really nice looking Getting Things Done system. After all that trouble, it still doesn't work! I'm filing this one under "@ Someday Maybe".

Technorati Tags:

3 Comments »

  1. Sounds like a lot of fun. The next time you need to remove a bunch of lines from a file, say any line with "foo" in the file bar.sql, use the following command:

    grep -v foo bar.sql > nofoo.sql

    Or if you don't want to bother doing blog backups by hand checkout my new service:

    http://backupmyblog.com

    Comment by Doug Martin — March 22, 2006 @ 8:28 am

  2. [...] - Oxygen-Aux Send Moustache rolls with Wordpress BackupMyBlog After my misadventures in server admin the other day, I found myself wondering why someonehasn’t built a service to automagically backup blog databases. Since blogs are still about as complicated to manage technically as they were five years ago and the median blogger is trending less and less tech-savy, this seems like a golden opportunity for someone. [...]

    Pingback by Moustache » BackupMyBlog — March 22, 2006 @ 1:26 pm

  3. HA-HA IT'S A NERD WITH ANGST! HA-HA!

    Comment by quinn — March 26, 2006 @ 5:14 pm

RSS feed for comments on this post.TrackBack URI

Leave a comment