I've recently reinstalled my Debian server but forgot to backup mysql databases which were in folder /var/lib/mysql.

I need to recover them and tried to use PhotoRec but I can't find the mysql databases there. I have shutdown my server for the moment so it doesn't deteriorate the recovering process.

Is there any better way to do that, perhaps something with more chance of success?

Thank you so much!!


You were correct to power off your system. Your best bet is to boot from a rescue disk, such as SystemRescueCD, and try to recover the files using file recovery utilities. SystemRescueCD comes installed with PhotoRec and TestDisk. The extundelete utility is also worth a try. While it does not come installed on SystemRescueCD, you could install it onto removable media or customize into SystemRescueCD.

  • Thank you! I will give it a shot, however I don't have physical access to that server so I can't use a rescue disk. Does extundelete work without a rescue disk? – shining-light Apr 30 '12 at 14:16
  • Yes, extundelete will work without being run from a rescue disk. – George M Apr 30 '12 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.