Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix serious bug where streaming backps redicted to /dev/null

When determining the filename where a backup should be stored,
the xtrabackup plugin only considered values for stream of 'tar'
and 'xbstream', so when using the 1.0.6 default value of
stream = yes, this would generate an empty backup.
This patch ensures we're always comparing the stream value
through determine_stream-method() so we have a consistent
view of the real backup method request, where boolean true
values map to 'tar' and false values map to a non-streaming
method.
  • Loading branch information...
commit 582f8748c85fa60be4f5e58fd3ee20f1ef9397f6 1 parent d5378b0
@abg abg authored
View
13 plugins/holland.backup.xtrabackup/holland/backup/xtrabackup/plugin.py
@@ -95,17 +95,20 @@ def open_xb_stdout(self):
"""Open the stdout output for a streaming xtrabackup run"""
config = self.config['xtrabackup']
backup_directory = self.target_directory
- if config['stream'] in ('tar', 'tar4ibd', 'xbstream'):
+ stream = util.determine_stream_method(config['stream'])
+ if stream:
# XXX: bounce through compression
- if 'tar' in config['stream']:
+ if stream == 'tar':
archive_path = join(backup_directory, 'backup.tar')
zconfig = self.config['compression']
return open_stream(archive_path, 'w',
- method=zconfig['method'],
- level=zconfig['level'])
- elif 'xbstream' in config['stream']:
+ method=zconfig['method'],
+ level=zconfig['level'])
+ elif stream == 'xbstream':
archive_path = join(backup_directory, 'backup.xb')
return open(archive_path, 'w')
+ else:
+ raise BackupError("Unknown stream method '%s'" % stream)
else:
return open('/dev/null', 'w')
Please sign in to comment.
Something went wrong with that request. Please try again.