Reputation: 1311
We have webserver & database are on azure VM machines. MySQL is installed on the azure VM machine. Recently, we had an issue with the database corrupt. And, asked Azure to restore the backup from old dates when everything working fine. Azure takes backup of the whole machine on daily basis. They restore the old backup on a separate machine. We supposed that the database will be fine there because the backup is of old date.
But, the issue is still the same.
So, my questions are:
How exactly VM takes backup of the whole machine?
And, does it reference the existing machine while restoring on some new VM machine?
How could I get the correct restored database files?
Note: MySQL logs are also attached.
Upvotes: 0
Views: 100
Reputation: 1759
The whole VM backup means that a point-in-time snapshot is taken. With a running database like MySQL this might mean that the database files are in an inconsistent state at the time of back-up. Extra configuration on the Virtual Machine is needed to provide a consistent backup in the form of pre- and post scripts. Microsoft details how to do this in this documentation
That however seems of little use in the situation you are in at the moment. As stated in the InnoDB recovery documentation a good option would be to force manual InnoDB recovery. Documentation for manual recovery can be found here.
Upvotes: 1