Commit 16b8c4b5 authored by Vincent Pelletier's avatar Vincent Pelletier

Make backup-related configuration entries optional.

Complete list:
backup-script, full-backup-directory, incremental-backup-directory,
innobackupex-incremental, innobackupex-full, innobackupex-binary,
xtrabackup-binary
parent 1e04cf84
...@@ -127,21 +127,23 @@ class Recipe(GenericBaseRecipe): ...@@ -127,21 +127,23 @@ class Recipe(GenericBaseRecipe):
)] )]
) )
path_list.append(mysqld) path_list.append(mysqld)
# backup configuration # TODO: move to a separate recipe (ack'ed by Cedric)
full_backup = self.options['full-backup-directory'] if 'backup-script' in self.options:
incremental_backup = self.options['incremental-backup-directory'] # backup configuration
innobackupex_argument_list = [self.options['perl-binary'], full_backup = self.options['full-backup-directory']
self.options['innobackupex-binary'], incremental_backup = self.options['incremental-backup-directory']
'--defaults-file=%s' % mysql_conf_file, innobackupex_argument_list = [self.options['perl-binary'],
'--socket=%s' % socket.strip(), '--user=root', self.options['innobackupex-binary'],
'--ibbackup=%s'% self.options['xtrabackup-binary']] '--defaults-file=%s' % mysql_conf_file,
environment = dict(PATH='%s' % self.options['bin-directory']) '--socket=%s' % socket.strip(), '--user=root',
innobackupex_incremental = self.createPythonScript(self.options['innobackupex-incremental'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list + ['--incremental'], environment]) '--ibbackup=%s'% self.options['xtrabackup-binary']]
path_list.append(innobackupex_incremental) environment = dict(PATH='%s' % self.options['bin-directory'])
innobackupex_full = self.createPythonScript(self.options['innobackupex-full'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list, environment]) innobackupex_incremental = self.createPythonScript(self.options['innobackupex-incremental'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list + ['--incremental'], environment])
path_list.append(innobackupex_full) path_list.append(innobackupex_incremental)
backup_controller = self.createPythonScript(self.options['backup-script'], __name__ + '.innobackupex.controller', [innobackupex_incremental, innobackupex_full, full_backup, incremental_backup]) innobackupex_full = self.createPythonScript(self.options['innobackupex-full'], 'slapos.recipe.librecipe.execute.executee', [innobackupex_argument_list, environment])
path_list.append(backup_controller) path_list.append(innobackupex_full)
backup_controller = self.createPythonScript(self.options['backup-script'], __name__ + '.innobackupex.controller', [innobackupex_incremental, innobackupex_full, full_backup, incremental_backup])
path_list.append(backup_controller)
# TODO: move to a separate recipe (ack'ed by Cedric) # TODO: move to a separate recipe (ack'ed by Cedric)
# percona toolkit (formerly known as maatkit) installation # percona toolkit (formerly known as maatkit) installation
for pt_script_name in ( for pt_script_name in (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment