Answer the question
In order to leave comments, you need to log in
Restoring MySQL Database Files on Debian GNU/Linux 6.0
Hi all.
I have a very uncomfortable situation.
Today I needed to rollback the DB.
I
did it this way:
mysql -u root -p < /opt/bcp/project_db-2012-04-05-0141.sql
more than 40. There was a loss of very important data. Looking at the dump file, I saw that it was incomplete.
There is no point in discussing the reasons why the backup turned out to be crap, but I began to think about how to restore the current state of the database from which I rolled back, calling myself an idiot that I did not backup manually before rolling back.
Obviously, there is only one recovery option: try to recover the files themselves, in which MySQL stored the database tables. If the tables were of type MyIsam, then each table would be stored in a separate file, which could be restored using one of the utilities for recovering deleted files. But all my tables were of the InnoDB type, so the entire database was stored in one file.
I'm only a programmer, and I'm not even an advanced Linux user, so I don't know for sure if my option is possible. And the option is this:
In the flooded dump, the database was deleted before flooding (standard DROP DATABASE IF EXISTS), which means that the file in which the database was stored was also deleted, and then it was recreated when the database was created by the dump.
I want to know if it is possible that one of the utilities for recovering deleted files will be able to determine that such and such a file existed, that it was deleted, and whether it can be restored. Of course, I doubt it (although I hope), because the file was then re-created.
Thank you.
Answer the question
In order to leave comments, you need to log in
In a flooded dump, the database was deleted before flooding (standard DROP DATABASE IF EXISTS), which means that the file in which the database was stored was also deleted, and then it was recreated when the database was created by the dump.
> The reasons why the backup turned out to be crap, it makes no sense to discuss here.
At least give a hint so that others do not run into something like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question