+ Post New Thread
Results 1 to 7 of 7
*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 ...
  1. #1
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    320
    Thank Post
    13
    Thanked 22 Times in 17 Posts
    Rep Power
    23

    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.

  2. #2
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    320
    Thank Post
    13
    Thanked 22 Times in 17 Posts
    Rep Power
    23
    Does anyone have any ideas?

  3. #3
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    320
    Thank Post
    13
    Thanked 22 Times in 17 Posts
    Rep Power
    23
    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.

  4. #4

    Join Date
    Mar 2011
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    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?

  5. #5

    Join Date
    Mar 2010
    Location
    Dover
    Posts
    11
    Thank Post
    0
    Thanked 4 Times in 4 Posts
    Rep Power
    10
    techzilla, what file system are you using?

  6. #6
    z80
    z80 is offline

    Join Date
    Jun 2011
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by Irazmus View Post
    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.
    Hello - I'm in a similar position (needing to recover .myd files). Can you let me know the process you used?

    thanks.

  7. #7
    Irazmus's Avatar
    Join Date
    Feb 2006
    Location
    Suffolk
    Posts
    320
    Thank Post
    13
    Thanked 22 Times in 17 Posts
    Rep Power
    23
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. Mysql - Track database changes
    By danIT in forum Coding
    Replies: 4
    Last Post: 25th June 2011, 05:46 PM
  2. Corrupted Terminal Server Licensing database
    By bertster in forum Windows Server 2000/2003
    Replies: 0
    Last Post: 2nd July 2010, 12:03 PM
  3. Sims Database Error- any hope of recovering data?
    By philjones2000 in forum MIS Systems
    Replies: 7
    Last Post: 29th March 2010, 06:13 AM
  4. [Fog] Can't connect to mysql database
    By jack0w in forum O/S Deployment
    Replies: 12
    Last Post: 28th October 2009, 09:52 AM
  5. Replies: 4
    Last Post: 28th February 2007, 09:37 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •