[MDEV-14099] IBD file extension is not suitable for Windows system restore Created: 2017-10-21 Updated: 2020-07-06 Resolved: 2017-10-21 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows, Server, Storage Engine - InnoDB |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Tobia Scapin | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 1 |
| Labels: | innodb, windows | ||
| Description |
|
Dear all, If System Restore starts (consider that this can starts automatically from a simple power loss) all "monitored" files are rolledback included IBD file of MariaDB databases. After the Windows restore MariaDB service starts normally but all its data is rolledback at restore point due to IBD file restore! I tried to find a solution configuring Windows Restore, if I exclude MariaDB folder from the restore using FilesNotToSnapshot (https://msdn.microsoft.com/en-us/library/windows/desktop/bb891959(v=vs.85).aspx) the restore process simply delete IBD files instead of restoring them. *Seems that there is not way to do not touch IBD files during System Restore. *The only solution is to change the file extension. I think this is a serious problem and I spent a lot of time to understand what was the cause of some huge (many days!) rollback of my users after power loss. I wonder if MariaDB can optionally use a different extension for IBD files. |
| Comments |
| Comment by Vladislav Vaintroub [ 2017-10-21 ] | ||||||||||||||||||||||||||||||||||||||||||
|
It does not help if MariaDB is using a different extension, because for all supported version of Windows that MariaDB supports, Windows system restore is not using file extensions anymore (see e.g Wikipedia on that topic https://en.wikipedia.org/wiki/System_Restore). Apart from that, why would one want to exclude database files. It is a backup-restore on system level, and as with any backup-restore it rolls back to the state when the backup was taken. I'd say it is the expected behavior. As for silent "system restore" after power loss, I am not aware of that, but even if that happens, mariadb can't do much. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2020-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||
|
So, somebody else asked about that today, and I gave it a try myself. Have to confess that 3 years ago I did not even really understood what it was about, that system restore thing is very obscure, and I did not do this ever, nor I was affected by it, for the 2.5 decades of using Windows. So here is the question I checked, the system restore seems to be a combination of 2 volume snapshots , the taking one at the time of "system restore", for the "Undo" functionality, and another one of the past point in time, to which "system restore" would rollback , and I had another one, taken by MSI for "MariaDB installation",
I had created "06/07/2020 15:27:57" restore point myself, added some rows to innodb, then in 3 minutes told "system restore" to restore to the said point, and , after much huffing and puffing (not sure how much it took, 1 hour, more maybe, I was away ), it reverted innodb to the state 3 minutes before. Yes, this seems like a bad thing would have happened, but the backup is there, and it is accessible I do now
to restore to the "pre-recovery" time. That's it. Yet so far, it seems like "system restore" is slightly unpleasant, but not the fatal-data-loss scenario. | ||||||||||||||||||||||||||||||||||||||||||
| Comment by Tobia Scapin [ 2020-07-06 ] | ||||||||||||||||||||||||||||||||||||||||||
|
Thank you for sharing. I added the system restore disabling in my installation procedure. |