0

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?

1
  • 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

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.

2
  • 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

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.