Permalink
Browse files

handle stream = bool options more compatibly

Initially the xtrabackup changes in 1.0.8 only
accept stream = (yes,no,tar,xbstream), but this patch
ensures that we handle the various boolean options the
old v1.0.6 config format allowed so backwards compatibiity
is preserve across minor releases.
  • Loading branch information...
1 parent 24b7dd1 commit d5378b080390730222145931596d78b1844c0d81 @abg abg committed Feb 4, 2013
@@ -21,7 +21,7 @@
global-defaults = string(default='/etc/my.cnf')
innobackupex = string(default='innobackupex-1.5.1')
ibbackup = string(default=None)
-stream = option(yes,no,tar,xbstream,default=tar)
+stream = string(default=tar)
apply-logs = boolean(default=yes)
slave-info = boolean(default=no)
safe-slave-backup = boolean(default=no)
@@ -118,13 +118,14 @@ def apply_xtrabackup_logfile(xb_cfg, backupdir):
def determine_stream_method(stream):
"""Calculate the stream option from the holland config"""
- if stream in ('yes', 'tar', 'tar4ibd'):
+ stream = stream.lower()
+ if stream in ('yes', '1', 'true', 'tar', 'tar4ibd'):
return 'tar'
if stream in ('xbstream',):
return 'xbstream'
- if stream == 'no':
+ if stream in ('no', '0', 'false'):
return None
- raise BackupError("Invalid stream method '%s'" % stream)
+ raise BackupError("Invalid xtrabackup stream method '%s'" % stream)
def evaluate_tmpdir(tmpdir=None, basedir=None):
"""Evaluate the tmpdir option"""

0 comments on commit d5378b0

Please sign in to comment.