Comments table crashed, HostGator to the rescue

I finally upgraded my WordPress install today, and like a responsible web admin, I backed up my database and also my file tree. After my upgrade I noticed that my comments were all gone! I grumbled a bit and figured I’d extract the files from my backup. I opened my file up and noticed there were no comments. Doh! Where are they? I checked my backup from June, no comments. The latest backup I had with comments included was from February. The phpMyAdmin console showed the table “in use”. Not sure exactly what to do, I opened up a quick Live Chat with my hosting provider, HostGator, and noticed that I was #1 in queue with what, 147 agents available? My problem was fixed in less than 5 minutes. The fix also recovered a few comments that were posted after my last good backup.

I apologize to those of you that tried posting comments the past few months, because they were all eaten up due to the table being locked. I’m not sure what happened, but the support guy told me how to fix it myself if it ever happens again. Essentially, there’s a GUI in the cPanel to check and repair individual databases. I work with MySQL quite a bit at work, but I wouldn’t consider myself a DBA. Now I need to find a better WordPress backup plugin, because I think it should have thrown out some type of error if the table wasn’t readable.

Anyway, I’d like to take this opportunity to recommend HostGator. If you need hosting, please check them out. Any signups done through my link will help pay for my web hosting. Also, you can use code SCIFI25OFF for 25% off your first order. They offer 1 click WordPress installations if you are looking for something like that.

Here are my steps prior to all WordPress upgrades:

  1. Backup Database via Plugin, also can be done through phpMyAdmin
  2. Open cPanel and through File Manager, copy my WordPress directory “/installdir” to another directory like “install2011backup”. I think you can only do this quickly if your blog is not installed directly into the root /  – note, this takes just SECONDS, rather than downloading thousands of individual files
  3. Run upgrade, hope for the best

Here is how I restore

  1. Restore Database via phpMyAdmin
  2. rename install directory to /install-bad
  3. rename backup directory from /install2011backup to /install

Do you have a blog? What is your disaster recovery plan?

1 thought on “Comments table crashed, HostGator to the rescue”

  1. Sounds a lot like a case of broken tables. You can fix this yourself in phpmyadmin a lot of the time by using the query

    REPAIR TABLE $tablename

    that will restore the table quickly for you should this happen in the future.

    You can probably make a crontab to auto check / repair tables once every so often to help prevent down-time.

    Hope this helps out 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Please prove you are a human * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Post

Back from vacationBack from vacation

I had so much going on the past month!

  • Family came to visit from May 1st to May 10th for my college graduation
  • I relocated to a new city for a new job May 17th
  • Went to a wedding in Minnesota on May 24th
  • I start my new job tomorrow, June 2nd

I’m really not sure how much free time I will have with this new job, but I will try to keep updating with interesting posts once a week. Also, I’ll do my best to stick with a book review every 2-3 weeks or so. Here is my list of upcoming books I hope to review soon:

  1. Neuromancer by William Gibson
  2. Tau Zero by Poul Anderson
  3. Manta’s Gift by Timothy Zahn

I’ve also decided I’m going to go back and review short stories in Asimov’s Robot and Foundation Universe in the order of Johnny Pez’s Insanely Complete Fiction List that I have hosted here. I’m not sure when exactly I’ll start that project, but most likely I’ll post entries here and there as I complete them.

Site launchSite launch

I started purchasing books for my Robot and Foundation timeline reading project back in April of 2005. I realized that reading 36 books would probably make a very good start for a Sci-Fi review website. After completing most of my collections I started reading and compiling my reviews. Finally, on April 25, 2006 I registered this domain and started posting my reviews for everyone to see.

So I have been a bit behind with my reviewsSo I have been a bit behind with my reviews

I’ve been a bad reviewer lately. I usually try to write my reviews right after viewing or reading but I haven’t had as much time to write them lately. I’ve been playing World in Conflict quite a bit lately, which competes with my reviews here. I should actually do a review for that sometime, since I spend so much time playing it. It takes place in an alternate reality where the Soviets invade the US in 1990. For more information in the meantime just click the link above.

So, here are the things I have watched so far, but have yet to review:

  1. Blade Runner – The Final Cut: (I’ve watched the movie, which was awesome, but I still have to work through the rest of the special features on the last disc)
  2. I am Legend (2007) – I’ve actually watched this twice, once with my Father while on vacation, and again with my wife
  3. Battlestar Galactica: Razor – Unrated Extended Edition

I’m also in the process of reading two books: Children of Dune by Frank Herbert, and The Age of Spiritual machines by Ray Kurzweil. The latter is not really science fiction, but I’m about half way through it and many of the ideas probably seemed like fiction back when it was published in 1999. Many of the predictions Kurzweil makes in the first half are fairly accurate, so I’m interested to see what he will say in the second half.

My next major milestone will be to read Chaos Theory, Asimov’s Foundations and Robots, and Herbert’s Dune: The Fractal Aesthetic of Epic Science Fiction.

That should keep me busy for a little while.