MYSQL INNODB Recover table data

MySQL

My web application is built using PHP Laravel framework, and I accidentally run php artisan migrate:fresh which is a command that drops all the tables and recreates them again.

I have done some research and it seems possible to recover the old table structure along with its data but I think my case is different than what I saw on other posts: I have the .frm and .ibd files, but I am not sure how to use them and if these are still useful.

I just want to know if I still can recover all the lost data.

Best Answer

if your data is mission critical and you really cannot move forward without it there are some very specialist tools on the market for recovery. There are only small amount of experts that know how to do this properly. I spent some years working at a consultancy that could do this with varying degrees of success and it was very expensive in terms of $ and time. Take a look on https://recovery.twindb.com/ to see if there's anything there that can be useful.

Don't forget to set your backups up to avoid this situation again in the future. There are plenty of tools out there that make this simple for you.

https://www.percona.com/downloads/XtraBackup/LATEST/

https://www.binlogic.io/