pe***********@gmail.com wrote:
Hello,
I have ran a script in which I created a temporary table and dropped
the table at the end of the script. Unfortuantely not only was this
table dropped but all of the other tables in the database were dropped
as well.
Unfortuantely, the backups are made every day at midnight. So all of
the information for the past 23 hours has been currently destroyed.
Yeah, this points out a principle of backups: run backups on a schedule
such that you can tolerate lost data of the full backup interval. That
is, if your business can tolerate only 1 hour of lost data, make the
backups every hour.
1. Is there anyway of recovering this data.
Probably not. All I can suggest is that if you use MyISAM tables, you
might be able to use an "undelete" tool. Depending on your operating
system, there might be an undelete tool that can read the raw bytes on
the disk device and reconstruct the file. But it's possible that some
other file activity has overwritten that area of the disk by now. I
don't have much experience with undelete tools, so I can't say if it
will help in the case of a
If you use InnoDB tables, I bet it's even more tricky to recover dropped
tables. I have no suggestion in this case.
2. And 2 is this a common occurence with temporary tables.
No, that's not common in my experience. It should be relatively
straightforward that "DROP [TEMPORARY] TABLE tableName" drops only one
table. You can use the TEMPORARY keyword, and it will drop the named
table only if it's a temporary table.
Read
http://dev.mysql.com/doc/mysql/en/drop-table.html for more information.
Regards,
Bill K.