Offended the God of Computer
Tuesday, July 29th, 2008
…it’s just a matter of time when you will be punished.
It’s probably because I didn’t have a gratitude, or that I didn’t offer sacrifices to the god of computer on full-moon and new-moon, and I got punished today as a warning.
I was upgrading the Wordpress to 2.6, primarily for testing the compatibility of xLanguage. Of course, the first step is to dump the existing data to the testbed platform. It’s was a very long time when I was doing this last time, but luckily I have left the migration script somewhere. Bang! It’s still working, great!
Then I “diff”ed the part that I customized, and overwrote the existing binaries with 2.6’s as instructed, then patched the “diff”, all green.
I was going back to the Admin panel, was trying to see if the patch still works on 2.6. Before I could get to there, I found that some entries are gone! Now when I was checking the migration script…
“Darn…” I felt an icy wind was breezing over my cold sweating face…Looks like I have managed to reversed the migration direction, I had the production blog database overwritten with an very old testbed data.
I still recalled my Daily backup server was down for a while, original plan is to leave it there until I went back home. And just now, I was pinging it while hoping miracle to happen. No it didn’t happen, the computer returned “ssh: connect to host backup port 22: Connection refused.”
Let’s take a look at the MySQL’s log folder, looks like the God of Computer didn’t abandon me yet. The Binlog that I turned on earlier is still functioning; I can still dump every SQL statements ever executed on the server.
It took me some time to locate the last blog migration from the binlog, then replaying all the MySQL statements in between. Well, it actually took much longer than I expected to replay 2 month worth of statements, even though I had filtered out the WassUp unless transaction, it was still taking it more than 1 hour to replay the remaining statements.
Take home message: it’s important to have backup, and probably multiple backup. According to a non-scientific survey, almost 90% of data disaster was introduced by Human. Thank god for guiding me over the process, and I should fix my backup server ASAP.



English