I’m not convinced I like the comment management UI in WordPress 2.5: I accidentally marked several previously-approved comments as spam and then deleted them. Fortunately, I noticed my mistake within a couple of hours, quickly enough that the most recent nightly backup was still around, but it was still an easier mistake to make than I would have liked.


  • Other WordPress users, beware.
  • If you’re saving something you care about, practice restoring from the backup! (Some googling showed me how to restore from a mysqlhotcopy backup, but I still had one heartstopping moment where the initial restore didn’t work because of a file ownership/permissions problem.)
  • If you’re saving something you care about, keep multiple nights’ worth of backups.

So what’s the best way to address that last issue? We have enough disk space lying around that I could just keep around tens of nightly snapshots. But snapshots from night to night are, in general, not very different, and the process (other than transient spam comments) is largely additive; I don’t see why a complete revision history should take up that much more space than two full backups. (Hmm, maybe that’s a bit optimistic, because of all those spam comments.) But tools like that that I’m aware of are all line-based, and I don’t know offhand of a good way to do a mysql database backup that puts different rows in different lines. So I might have to use a binary diff program, which I’m not that familiar with; maybe bsdiff?

Maybe I’m going at this in the wrong direction – maybe I should approach the problem at a different level, backing it up using some sort of xml format that WordPress can handle through its management interface? If I did that, I’d have more confidence that I’d be able to manipulate the resulting backup files in a non-harmful fashion that’s more amenable to line manipulation.

For now, though, I think I’ll just throw disk space at the problem…

Post Revisions:

There are no revisions for this post.