incremental backups should be incompatible with --stream=tar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
High
|
Alexey Kopytov | ||
2.0 |
Fix Released
|
High
|
Alexey Kopytov | ||
2.1 |
Fix Released
|
High
|
Alexey Kopytov |
Bug Description
The TAR file format requires a file size for each archive entry written in the header, i.e. before the actual file contents. As in the case with compressed backups, this makes this format unusable for incremental backups, since we don't know the .delta file size in advance.
Currently XtraBackup writes the full size (i.e. the size of the original InnoDB data file) to the TAR header for the corresponding .delta file when creating incremental backups with --stream=tar. Originally it was assumed that even when fewer bytes are actually written for a .delta file, the tar utility would handle such conditions correctly when extracting the file from archive. However, it turns out it only worked correctly because libarchive pads the file contents to the length specified in the header. That is, for a 1 MB .ibd file with only one page changed, the resulting incremental archive would contain a 1 MB .delta file with 1 page padded by zeroes to 1 MB. Which defeats the purpose of incremental backups, since they occupy as much as space as a full backup.
Similarly to bug #972169, the solution is to make --incremental-lsn incompatible with --stream=tar. XtraBackup should fail with an error message suggesting to use --stream=xbstream.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 92 lines (+54/-10)4 files modifiedsrc/xtrabackup.c (+16/-0)
test/t/bug972169.sh (+14/-0)
test/t/bug999750.sh (+21/-0)
test/t/ib_stream_incremental.sh (+3/-10)
description: | updated |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PXB-331