473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Emergency ----- Database Emptied - Loss Everything - What can be done??

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.

What I need to know.

1. Is there anyway of recovering this data.
2. And 2 is this a common occurence with temporary tables. btw - I am
a newbie and more than open to being in the wrong.

Specs are as follows

Linux, Php, Apache, Mysq 4.1.10

Jul 23 '05 #1
2 1355
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.
Jul 23 '05 #2
Thank you for the reply. Point taken about back-ups.

Sounds as if this is less a mysql issue now and more of a linux file
recovery issue. I'll take up more hunt there.

thanks again.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.