Re: FN-FORUM: MySQL retrieving lost data
date posted 1st October 2003 15:27
Jon Irvine [EMAIL REMOVED] wrote:
> Please, please, please.... someone tell me this is possible!
>
> i just deleted (dropped) a local mysql database, is there anyway of getting
> it back?
I don't think so, sorry. :(
If you look in your MySQL main data directory, you'll find there is
a directory for each database. When you drop I guess this just gets
deleted and thus the data files inside go too.
For my important database installations, I have a cron job set up to do
regular dumps of the whole database.
cron the following once or several times a day, to give you a rolling
seven day backup of all your MySQL databases.
#!/bin/sh
#
# dump file format is: backup-X-YY.dmp
#
# X = YY =
#
DUMPFILE="/data/backups/mysql/backup-`/bin/date +"%u-%H`.dmp"
/usr/local/mysql/bin/mysqldump -pPASSWORD -u root --opt --all-databases \
> ${DUMPFILE}
-Paul-
--
Paul Civati www.xensia.net
Xensia, London UK - Quality UK Hosting Services
Budget dedicated servers in Global Switch London now available!