From 2b9e777637548b4f43efc1e26f8268dc21921fc8 Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Tue, 21 Apr 2015 13:36:08 +0200 Subject: [PATCH] Bugfix on Xtrabackup crons --- manifests/backup/xtrabackup.pp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/manifests/backup/xtrabackup.pp b/manifests/backup/xtrabackup.pp index fb4ed6203..073048dcb 100644 --- a/manifests/backup/xtrabackup.pp +++ b/manifests/backup/xtrabackup.pp @@ -19,27 +19,23 @@ $execpath = '/usr/bin:/usr/sbin:/bin:/sbin', ) { - mysql_user { "${backupuser}@localhost": - ensure => $ensure, - password_hash => mysql_password($backuppassword), - require => Class['mysql::server::root_password'], - } - package{ 'percona-xtrabackup': ensure => $ensure, } + cron { 'xtrabackup-weekly': ensure => $ensure, - command => 'innobackupex $backupdir', + command => "innobackupex ${backupdir}", user => 'root', hour => $time[0], minute => $time[1], weekday => 0, require => Package['percona-xtrabackup'], } + cron { 'xtrabackup-daily': ensure => $ensure, - command => 'innobackupex --incremental $backupdir', + command => "innobackupex --incremental ${backupdir}", user => 'root', hour => $time[0], minute => $time[1], @@ -54,5 +50,4 @@ owner => $backupdirowner, group => $backupdirgroup, } - }