Merge lp:~akopytov/percona-xtrabackup/bug1217426-2.2 into lp:percona-xtrabackup/2.2
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alexey Kopytov | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4886 | ||||
Proposed branch: | lp:~akopytov/percona-xtrabackup/bug1217426-2.2 | ||||
Merge into: | lp:percona-xtrabackup/2.2 | ||||
Diff against target: |
73 lines (+39/-0) 4 files modified
xtrabackup/innobackupex (+19/-0) xtrabackup/test/inc/ib_stream_common.sh (+8/-0) xtrabackup/test/inc/xb_local.sh (+6/-0) xtrabackup/test/t/ib_rsync.sh (+6/-0) |
||||
To merge this branch: | bzr merge lp:~akopytov/percona-xtrabackup/bug1217426-2.2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Sergei Glushchenko (community) | g2 | Approve | |
Review via email: mp+187729@code.launchpad.net |
Description of the change
Bug #1217426: Empty directory is not backed when stream is used
The problem was that innobackupex ignored empty directories when
creating streaming backups. Normally a database created by the server
contains a ?db.opt? file, and so the corresponding directory is not
empty. However, in some circumstances a database may be created with
?mkdir?. This is what mysql_install_db does to create the default ?test?
database. Since there are no files to send into the
stream, the resulting stream would contain no references to the empty
directory, so it would not be created when the stream is unpacked and
thus, missing in the backup. Which resulted in inconsistency between the
original data directory and the one after restoring from the backup.
One solution to this problem would be to stream empty directories. This
is rather complicated from the implementation point of view. Since both
xbcrypt and xbstream only deal with files, it would require implementing
support for directory units, i.e. introducing new ?directory? chunk
types, bumping the format version, modifications to the datasink API and
utility command line interface, etc.
A much easier solution is to stream a fake empty ?db.opt? file for empty
directories. This way the corresponding database will be present in the
backup, and the empty db.opt file will be ignored by the server after
restore.
http://
Approve