January 16, 2005 Archives

From the man-I-didn't-want-to-spend-two-hours-on-that department:

I managed to delete all the comments submitted in the last 2-3 weeks yesterday. I'll hack up a script to parse them out of the HTML and put it back into the database, but I didn't run it yet... Anyway, your comments should be back later today.

If you accidentally delete your comments from your weblog, before you do anything else make a backup of the generated HTML files.

Update: The comments are back, yay. Here's the script I hacked up. It has a bunch of hardcoded things related to my weblog, but as I'm using the standard templates it might work as a starting point for you if you deleted your comments from the database too and want to "get them back" from the html. Or not. I ran it like this from my archives directory:

find `pwd`/2004 -name \*.html | (cd ~mt/MT; xargs ~/bin/parse_comments)

I've put my backup script back in place and I recommend you do so too. My script goes like this:

mysqldump -uroot MT |bzip2 -9 > MT.backup/MT.`date +'%Y%m%d-%H%M'`.bz2

I run it from cron a couple of times a day. Less would probably do fine, but I like it that way... :-)

About this Archive

This page is an archive of entries from January 2005 listed from newest to oldest.

January 14, 2005 is the previous archive.

January 17, 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.


OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.25