Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have recently had a problem with one of my VPS's and I do not have a recent backup of the MYSQL databases, although I have a full backup of /var. I have determined from the MYSQL config that the databases files are stored within:

/var/lib/mysql/

Although the file are not in SQL formatting, how would it be possible to convert or export these files to an SQL dump?

share|improve this question
    
Also, use this as a reminder and go make mysqldump run on all your other servers nightly :) –  Bill Weiss Nov 1 '11 at 16:07

1 Answer 1

You can try to point MySQL at that directory for its data and see what happens. If you happened to take the disk backup at a time when the database was quite you might be ok.

Try to match the version of MySQL to what you were running before, just to avoid adding another variable in the recovery.

share|improve this answer
2  
Even better: copy that /var/lib/mysql from the server to a workstation or whatever, and try to test run it first somewhere else than the actual server. That way one can minimize damage, should something unexpected happen. –  Janne Pikkarainen Nov 1 '11 at 12:41
    
Good point: don't do it on the backup copy, do it somewhere else :) –  Bill Weiss Nov 1 '11 at 16:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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