*nix Thread, Recovering a MySQL database from a corrupted ext3 filesystem in Technical; Last week one of our servers decided to delete the entirety of /var, including all it's logs and our helpdesk's ...
22nd November 2010, 10:51 AM #1
Recovering a MySQL database from a corrupted ext3 filesystem
Last week one of our servers decided to delete the entirety of /var, including all it's logs and our helpdesk's MySQL database. To make matters worse, although the backups live on a separate machine, they also appear to be missing /var and are thus useless.
I have tried a few different recovery utilities in an attempt to recover the database, the most successful being photorec [http://www.cgsecurity.org/wiki/PhotoRec], which has recovered 200+ frm (table definition) and MYI (MYISAM compressed data) files, but none of the MYD files which actually hold the data (it seems PhotoRec doesn't support recovering MYDs [http://www.cgsecurity.org/wiki/File_...ed_By_PhotoRec]).
Can anyone please point me to a tool/method for recovering MYD's from a corrupt ext3 filesystem. Assuming that's possible, a method of linking the MYD to it's appropriate frm and MYI (since the recovered files have random file names) would also be appreciated.
*Next task, review the backup verification procedure.
IDG Tech News
25th November 2010, 10:22 AM #2
Does anyone have any ideas?
8th December 2010, 09:25 PM #3
Thanks for the info.
We've managed to recover most of the database using the above link, the one table we couldn't recover held the helpdesk tickets, which we've (mostly) reconstructed using the helpdesk's e-Mail notifications.
I think it's safe to say we were lucky this time.
5th March 2011, 06:28 AM #4
- Rep Power
Lost Mysql dtabases as well
this has got to be one of the worst things to have happen,
catastrophic data loss!!!!
god i'm going to be skinned alive, if I can't come up with something.
photorec does only do .frm and .MYI but not the important .MYD.
is there anything i can do?
16th March 2011, 03:23 PM #5
- Rep Power
techzilla, what file system are you using?
13th June 2011, 12:09 PM #6
- Rep Power
Hello - I'm in a similar position (needing to recover .myd files). Can you let me know the process you used?
Originally Posted by Irazmus
13th June 2011, 02:50 PM #7
Unfortunately I can't remember the exact process (and it didn't get logged since it was the helpdesk database we were trying to recover), but I'm sure it was ext3grep which saved my skin.
There was more info in this thread but it seems to have gone AWOL, however the most important item was a link to the ext3grep documentation, which I believe can be found here: HOWTO undelete removed files and directories on an ext3 file system
That's assuming you're using an Ext3 file system as I was, if you're using a different file system you'll probably need to look for other tools. For recovering files from NTFS volumes I've found ntfsundelete to be useful. I've not (yet) had need to recover from any other file systems so can't advise if you're using a file system other than those two.
And in case it wasn't obvious, both those recovery operations were performed in Linux (Debian 5.0.8 to be exact).
As mentioned above, we didn't manage to recover every MYD file, we lost the printers and tracking tables, but we did manage to recover most of them.
I wish you luck in your recovery efforts. Let us know how you get on.
Last Post: 25th June 2011, 05:46 PM
By bertster in forum Windows Server 2000/2003
Last Post: 2nd July 2010, 12:03 PM
By philjones2000 in forum MIS Systems
Last Post: 29th March 2010, 06:13 AM
By jack0w in forum O/S Deployment
Last Post: 28th October 2009, 09:52 AM
By sidewinder in forum Windows
Last Post: 28th February 2007, 09:37 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)