From 120368f20575fdc19a5ef209b328da79070b054d Mon Sep 17 00:00:00 2001 From: Sergey Lukjanov Date: Tue, 17 Feb 2015 13:55:30 +0300 Subject: [PATCH] Make backups period configurable It could be useful to be able to configure externally how many backups we'll run. One of the potential use cases is to increase number of backups for the most sensetive services. Change-Id: I85f4f2fd7b3319ed8772f57ce14d8083c6646d7d --- manifests/site.pp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 7218f87..0a79a2f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2,12 +2,20 @@ # define bup::site( $backup_user, - $backup_server + $backup_server, + $cron_minute = '37', + $cron_hour = '5', + $cron_weekday = '*', + $cron_monthday = '*', + $cron_month = '*', ) { cron { "bup-${name}": - user => 'root', - hour => '5', - minute => '37', - command => "tar -X /etc/bup-excludes -cPf - / | bup split -r ${backup_user}@${backup_server}: -n root -q", + user => 'root', + minute => $cron_minute, + hour => $cron_hour, + weekday => $cron_weekday, + monthday => $cron_monthday, + month => $cron_month, + command => "tar -X /etc/bup-excludes -cPf - / | bup split -r ${backup_user}@${backup_server}: -n root -q", } }