Wednesday, August 12, 2009

Stupid, but we have backups now!

This time, it wasn't me, thank goodness:

DELETE FROM site_page_content WHERE site_id - 1450;

Whoops! Is that a minus sign or an equal sign near the end? Equal sign--just the one site gets deleted. Minus sign...every single website gets deleted (2,500 of them!) except, ironically, the one site that was supposed to be deleted.

Fortunately, because I accidentally deleted the entire user table discovered the backups weren't working just a couple weeks ago, the backups were fixed and working and we were able to restore all the websites in five minutes. A disaster of epic proportions was averted. Funny how things work out like that.

Apparently the bigger problem is that we are a little too quick on the draw when it comes to making changes on the production server. With only two programmers, though, it's hard to rationalize going to the time and effort of setting up a "system," although it would seem that we're rapidly getting to the point where NOT setting up a system is costing us more time and effort.

No comments: