[MDEV-13310] Preparing an incremental backup twice can corrupt data Created: 2017-07-13 Updated: 2017-10-10 Resolved: 2017-10-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup |
| Affects Version/s: | 10.2.7 |
| Fix Version/s: | 10.1.29, 10.2.10 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Andrii Nikitin (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Preparing already prepared incremental backup does show error message below in percona-xtrabackup as well mariabackup 10.1.25 (to protect users from incorrect action).
test below passes in 10.1.25 (mariabackup exits with error code 1), but fails in 10.2.7 (mariabackup exits without error):
10.1.25: |
| Comments |
| Comment by Marko Mäkelä [ 2017-08-10 ] | |
|
First, preparing a full backup should be safe to do repeatedly in Mariabackup 10.2. It should even be safe to kill the process and rerun the prepare. When it comes to preparing incremental backups, we must guarantee that .delta files cannot overwrite data files on which redo log has already been applied. Currently this is not the case! So, it is possible that the .delta files will corrupt data files by writing older data than what was applied from the redo log on the previous invocation. Because the redo log file ib_logfile0 was deleted by the first (successful) invocation of
re-applying the .delta files by repeating the invocation can cause unrecoverable corruption. My suggested fix is to remove each .delta files after applying them. |