So, I had recurring database problems and then some additional script problems, leaving the site down and out for almost two days. Now that is a little unsettling for someone who is used to perfection and having the daily cathartic effect of writing something really choleric.
Well, it would seem the system is up and running again. As it turned out, the database problems were resolved already yesterday. What I was struggling with today turned out to be someone on the admin side editing a core Nucleus file (libs/TEMPLATE.php) without telling me (and commenting out two instances of mysql_fetch_object). With the best of intentions I am sure. But the results were disastrous. And hard to pinpoint since that sort of thing isn’t exactly what you’re looking for when you’re troubleshooting. Some scripting mavens they must have at Surpasshosting
“An error you say? Well, just strike out that line of code.”
The end result: Almost two days lost. 4 posts gone with the wind due to a two days old backup being the only that wasn’t corrupt. The backups I had been doing locally were pretty much crap as well as I only do them once a day and obviously when the database is broken, you wont get any backups either. Duh. I should have thought about that.
So, what will I do to prevent this from happening again?
First, I will be doing incremental mysql backups. I.e. downloading the files and tagging them as file_todays-date.gz or whatever. Had I done that when I set up Getright’s daily downloads, I would have only lost 3 posts. That is a good start. But I feel that for efficiency’s sake I can’t run more than one backup a day. And it’s a little redundant to download the entire database when you only want regular backups of the last handful of posts so that you can prevent this exact thing. So what I did was to create a new RSS2 feed that outputs entire post, tags and all (yes it breaks the XML code most of the time but who cares) and install Feedreader on the backup / torrent computer which is obviously running 24/7. That way, I should be able to cache the posts in a smart fashion and who knows, maybe even cut the actual SQL backups down to once a week or something.
All in all somewhat annoying and time-consuming learning experience and a pertinent wake-up call. But hey, I have the rest of the summer to program this to perfection.
The only snag so far is that Feedreader creates an additional, updated item if you have edited a post after it was first downloaded. Instead of, say, overwriting the stored post. But that could also be seen as a sort of safe-guard against various mishaps I suppose.
Contact
Lifestream




