X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FPuppet.git;a=blobdiff_plain;f=modules%2Fprofile%2Fmanifests%2Fpostgresql%2Fbackup_dump.pp;h=cae20f748180833d4fe4065ebcfe43472516a9a4;hp=7578027513f0be18d5c452a8eb0aaf4afae44ca4;hb=33d0c69450127732c7105145b5e587811ffd644b;hpb=83341b3ca1ef7dbba1afaea41a722b43e50bdb5b diff --git a/modules/profile/manifests/postgresql/backup_dump.pp b/modules/profile/manifests/postgresql/backup_dump.pp index 7578027..cae20f7 100644 --- a/modules/profile/manifests/postgresql/backup_dump.pp +++ b/modules/profile/manifests/postgresql/backup_dump.pp @@ -30,13 +30,18 @@ define profile::postgresql::backup_dump ( $pg_port_arg = "" } + file { "/usr/local/sbin/backup_psql_$pg_host.sh": + mode => "0755", + content => template("profile/postgresql/backup_psql.sh.erb"), + } + if ($pg_host == "eldiron.immae.eu") { cron::job::multiple { "backup_psql_$pg_host": ensure => "present", require => [File[$pg_backup_path], File[$pg_path]], jobs => [ { - command => "/usr/bin/pg_dumpall -h $pg_path$pg_port_arg -f $pg_backup_path/\$(date -Iseconds).sql", + command => "/usr/local/sbin/backup_psql_$pg_host.sh", user => $pg_user, hour => "22,4,10,16", minute => 0, @@ -57,7 +62,7 @@ define profile::postgresql::backup_dump ( require => [File[$pg_backup_path], File[$pg_path]], jobs => [ { - command => "/usr/bin/pg_dumpall -h $pg_path$pg_port_arg -f $pg_backup_path/\$(date -Iseconds).sql", + command => "/usr/local/sbin/backup_psql_$pg_host.sh", user => $pg_user, hour => "22,4,10,16", minute => 0,