This was an issue caused by my own carelessness.  I have a script to just do a tar backup of my entire system to an external drive every night.  The script is this:

#!/bin/bash
OF=/mnt/backup/backup$(date +%Y%m%d%H%M%S).tar
mount /dev/sdb1 /mnt/backup
rm /mnt/backup/log.txt
touch /mnt/backup/log.txt
tar cvfW $OF / –exclude /mnt/backup –exclude /mnt/backup2 –exclude /proc –exclude /sys –exclude /dev –exclude /tmp > /mnt/backup/backup.log
find /mnt/backup/ -mtime +10 -exec rm {} \; > /mnt/backup/cleanup.log
umount /dev/sdb

It mounts the external drive, then backs up the system drive, then removes old backups.  Pretty simple.

If the external drive is not present to be mounted, tar continues on to do the backup to the /mnt/backup directory, even if the drive is not mounted at that directory.

So last night, I removed the drive for another purpose, since nothing has changed on my system in the past day.

Well, the backup process proceeded and filled my hard drive.  Luckily, it did not completely crash, and honestly, I probably wouldn’t have immediately noticed had I not needed to update a page for one of my client’s sites.  After uploading the page to the server, I noticed it was simply displaying a blank page.  I uploaded again and noticed filesize kept saying 0kb.  I proceeded to check things out and discovered that my hdd was full.  After some digging, I realized my mistake.  I removed the backup and life things returned to normal… almost.

My wordpress installation now showed all comments, tags, plugins, everything… except for the posts.  I was confused.  Everything seemed fine.  I decided to take a look at the mySQL database.

To login to your local mySQL db:

mysql -uroot –password=<root password> <databasename>

At the mySQL command prompt, I simply tried to see what I could pull from the posts table(for a diagram of wordpress database, see this.)

select * from wp_posts;

This returned the error:

“ERROR 145 (HY000): Table ‘<table name>’ is marked as crashed and should be repaired”

So, I tried a quick repair on the table:

repair table wp_posts;

and all was good in the world.