Skip to content
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
  • Loading branch information...
1 parent d5378b0 commit 582f8748c85fa60be4f5e58fd3ee20f1ef9397f6 @abg abg committed Feb 4, 2013
Showing with 8 additions and 5 deletions.
  1. +8 −5 plugins/holland.backup.xtrabackup/holland/backup/xtrabackup/
13 plugins/holland.backup.xtrabackup/holland/backup/xtrabackup/
@@ -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)
return open('/dev/null', 'w')

0 comments on commit 582f874

Please sign in to comment.
Something went wrong with that request. Please try again.