From: Peter Palfrader Date: Sat, 26 Sep 2015 11:22:22 +0000 (+0200) Subject: make base backups on backuphost at a different time X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=ef6096766cebab114509587d10d16afb39bd15b1;p=mirror%2Fdsa-puppet.git make base backups on backuphost at a different time --- diff --git a/modules/postgres/manifests/backup_server.pp b/modules/postgres/manifests/backup_server.pp index ef97552b0..e42cf8c68 100644 --- a/modules/postgres/manifests/backup_server.pp +++ b/modules/postgres/manifests/backup_server.pp @@ -10,7 +10,13 @@ class postgres::backup_server { source => 'puppet:///modules/postgres/backup_server/postgres-make-base-backups', mode => '0555', } - file { '/etc/cron.d/puppet-postgres-make-base-backups': - content => "20 0 * * 6 debbackup chronic /usr/local/bin/postgres-make-base-backups\n", + if $::hostname in [backuphost] { + file { '/etc/cron.d/puppet-postgres-make-base-backups': + content => "20 1 * * 0 debbackup chronic /usr/local/bin/postgres-make-base-backups\n", + } + } else { + file { '/etc/cron.d/puppet-postgres-make-base-backups': + content => "20 0 * * 6 debbackup chronic /usr/local/bin/postgres-make-base-backups\n", + } } }