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
This commit is contained in:
Sergey Lukjanov 2015-02-17 13:55:30 +03:00
parent f0aff665d5
commit 120368f205
1 changed files with 13 additions and 5 deletions

View File

@ -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",
}
}