Home

Gallery

Archives

Blog

About

Contact Me

"Personal thoughts, ramblings, and nonsense from Drew, himself."

Database Crisis

DeckerD almost died. Read on.

This story is about backups. I almost had to put DeckerD to sleep this afternoon. Needless to say, DeckerD is back up and running with much success. So how was it a crisis?? Read on, I say.

Data huh?

A database is a collection of data that is organized so that its contents can easily be accessed, managed and updated; of those the most common is a relational database1. The back-end that powers this website (Wordpress), a database is required, and very critical to a successful render of data. If there is no database, there is no website.

The Disaster

Disaster. Heh, more like catastrophe. I needed to upgrade my back-end from a 2.0.0 to a 2.0.2 version. In the documentation it states to disable all plugins, and backup certain files, and delete others [files]. So, I did. While doing this, I began to notice some slight changes to the site that I guess I missed. Before I go any farther, the documentation didn’t mess me up, it was a persistant problem that I had overlooked. Carrying on… the “changes” that I had noticed were looped drop-down menus, meaning that whatever value was in certain drop-down menus would loop, causing the drop-down boxes to scroll the right side of the screen and never stop. Other problems consisted of looped text (such as post names) and errors adding content to the database. This is when I knew, this was turning into a bad day.

So, I thought really hard; can’t remember when I last backed up the database (stupid!). What to do…what to do. Ah ha! I have recently set up a Debian-based FTP server from my house and had just done a recent full backup of my laptop (my main machine that I do 90% of my work on). So, anything related to the website, is on the FTP server now (as well as the laptop). So, I go into my “current projects” folder and find the DeckerD website content, and theres a database backup! Dated March 26, 2006, that’s only a couple of weeks old2. Sweet! So, I upload it on my test server. Sweet, it’s uploaded! Great! No, not great. Come to find out that it was not a recent backup, it had two posts backed up; two posts! Stupid me forgot that when I backed up the content, it didn’t keep the time-stamps, so everything had a time-stamp of the backup date. Not good.

Now, back to the thinking board. Wait! Where’s the one place that I do all my real current work? The Desktop. So I go back to the laptop backups on the FTP server and look at the desktop backups. Sure enough, there is an updated backup of the database. I was sure that this one would do the trick, because anything on my desktop is two months old or newer. So, again, I uploaded the database backup file. It took the backup and everything seemed alright with the import. So, I refreshed the site; success. S-U-C-C-E-S-S. The import was successful and no posts/comments were gone; must have been really recent.

The next step was to try to recreate the errors. Did everything I did with the old database, and couldn’t recreate the errors. Time to upload to the production server. Imported the database, it took it successfully, and refreshed the site; success again. All content was there. Still, I could not recreate the errors. This was a good sign to me, and I could breathe again.

Now it was time to start the upgrade process of the back-end. So, I started where I left off. Saved the files I needed to and got rid of the files that I didn’t need. Ran the upgrade script, and finished. The upgrade was successful and all files were verified.

The Lesson Learned

Backups are crucial. Don’t put them off by saying “Oh, it’s ok, I’ll get to them tomorrow”. Set a date and time. I have set up a process of my own; weekly updates. The database isn’t huge and the process is seamless. Come to find out, my database was corrupt, and can happen to anyone; don’t let your website become corrupt without a backup. It’s better to lose a week’s worth of stuff than months full of stuff. If your data is extremely crucial, I would do daily incremetal backups and weekly full backups. Whatever you are running, it must be important to you, after all, you do take the time to create it. So, next time you are thinking “Oh, I’ll get to that tomorrow.”, I suggest you start backing up now, before you put it off again. I learned from my mistakes, and hope you don’t have to learn from yours. Very well, carry on, and backup!


  1. Define by Lanyon »
  2. At the time of writing »

Go ahead, say somethin'





The Notebook

Windows Fix: "Insufficient system resources exist to complete the API"
Ugh. Another Windows error. Another Windows error that really doesn’t tell you what is really wrong; some (most) people aren’t nerds. Don’t worry, I’ve got your fix right here. This has to do with memory on your Windows XP system. Have you tried Hibernating or putting your system into standby after upgrading your RAM? If you have, keep on reading. More...

Curing 'Symbolic link not allowed' (Apache 2.0)
Awhile back when trying to add a directory to Apache on my Ubuntu 6.06 LTS server, I ran into some issues. These issues, of course were the infamous 403 “Forbidden” error that your web barfs up when you try to access a server that is not publicly viewable, because of permission issues. I’m going to give you my scenario and explain how you can fix this issue, so that you don’t have to go through an hour of throwing your hands up in disgust. More...

VMWare: "Failed to create named-pipe directory" error
Have you ever received the Failed to create named-pipe directory error message via the vmware-mui error log files, and not able to access the VMWare Management Interface? If so, here’s the fix. More...

/bin/rm: Argument list too long
Removing gigs and gigs, or just alot, of unwanted “opened” email that often clutters the system. More...

mmm del.icio.us

Similiar Material

No related posts