incremental backups should be incompatible with --stream=tar

Bug #999750 reported by Alexey Kopytov
6
This bug affects 1 person
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

description: updated
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-331

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.