Alors

Posted
So yesterday, when I was editing the "iPirate" entry, I found that a backslash was being inserted in front of all my quotes and double-quotes. So, "iPirate" became \"iPirate\". This was frustrating, to say the least. Image removed. (Above is the "Tweet of Doom" which apparently started everything. I guess I made one too many Apple jokes, because almost immediately after sending this tweet, things went downhill.) I didn't have time to troubleshoot the issue, so I thought I would just get creative and update the entry in the database with a query: update node_revisions set body = "I drew this back in 2005 [...] i-Pod was introduced."; What I forgot to include was where nid = 943 This had the effect of changing the text for all 943 nodes to the above. Needless to say, I was horrified. I took the site offline and it took me about three hours to get things back in order. Fortunately, I had a database dump from April 3rd. I used that and then manually stitched on the newer entries with the text still set to the mistake. It turns out that the node_revisions table also has a column named "teaser" and, because most of my posts aren't very long, for the 30 or so that were not in the backup, I was able to use the teaser text. The image links are kept in another table altogether. After that, I searched the cache files from my recent Firefox and Chrome sessions and was able to piece together the remaining missing text. Bottom line is, I am going to set up a cron job to dump the database nightly. It turns out that my hosting provider upgrading from CentOS 5 to CentOS 6 somehow caused PHP to start inserting the backslashes. Host Monster's support is awesome - they were able to help me diagnose and fix the problem this morning (Saturday!) within ten minutes of my emailing a request for help.
Daily Image Tags