Is it Possible to Rollback Table Deletion in Mysql

karthik80c
karthik80c used Ask the Experts™
on
Hi Experts,


We Have Mistakenly Deleted a Table in my DB and am using MySql . Is it Possible to ROLL Back or any other options . Please Provide your Valuable Suggestions
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
If this was MyISAM table, you need just to undelete table files in /var/log/mysql or whatever your data dir is. You can use ext3grep utility for that for example.
same applies ( more or less ) with innodb if you are using the file_per_table option. but it will be much more complex to get mysql to actually use the file if you recover it.

but honestly the answer is basically "no". there is very little chance that you can recover any usable data. you will spend lots of time, and probably end up with a small fraction of the data in an unusable format. either you have an sql or filesystem backup and there is a chance, or you'll end up loosing precious time.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial