incremental backups should be incompatible with --stream=tar

Bug #999750 reported by Alexey Kopytov on 2012-05-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Alexey Kopytov
Alexey Kopytov
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers