Accidently deleted MySQL databases


#1

OMG, I accidently deleted a couple of my MySQL databases and my blog site will no longer work. I haven’t backup my databases for the last few months and so I will be missing a lot of articles. I tried to contact the dreamhost support and requested for them to restore their server backup of my files. But they have yet to respond. Is there any faster way of getting help? I really need my site up as asap. thanks


#2

Waiting for Support to help you might be the best bet, depending upon your expertise, but if you are pretty handy with phpMyAdmin, this DH wiki entry might help you get sorted. :wink:

–rlparker


#3

Maybe the new “MySQL Recycle” feature will help. It’s in Goodies -> Manage MySQL. Let us know how that goes.

If the database is still listed on the above mentioned page along with your other databases, there is a Restore DB option to roll back to a previous version.

-Scott


#4

For what it’s worth, you probably should setup a cron job to backup the database.
I do daily backup with this:
mysqldump --opt -uUSER -pPASSWORD -h mysql.YOURHOST.com YOUR-DB > /home/YOURSHELL-USER/backup/mysql/DB.dump.date +%A

should be all one line. the date +%A thing causes the day of the week to be tacked onto the end of the file like this: DB.dump.Monday
Using the ‘snapshot’ feature, I could go back right now to the dump from Nov 27th.
oh yeah, fill in the caps with your info.
Might not help now, but could help someone else down the line.