make base backups on backuphost at a different time
authorPeter Palfrader <peter@palfrader.org>
Sat, 26 Sep 2015 11:22:22 +0000 (13:22 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 26 Sep 2015 11:22:22 +0000 (13:22 +0200)
modules/postgres/manifests/backup_server.pp

index ef97552..e42cf8c 100644 (file)
@@ -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",
+               }
        }
 }