aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/manifests/postgresql/backup_dump.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profile/manifests/postgresql/backup_dump.pp')
-rw-r--r--modules/profile/manifests/postgresql/backup_dump.pp9
1 files changed, 7 insertions, 2 deletions
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 (
30 $pg_port_arg = "" 30 $pg_port_arg = ""
31 } 31 }
32 32
33 file { "/usr/local/sbin/backup_psql_$pg_host.sh":
34 mode => "0755",
35 content => template("profile/postgresql/backup_psql.sh.erb"),
36 }
37
33 if ($pg_host == "eldiron.immae.eu") { 38 if ($pg_host == "eldiron.immae.eu") {
34 cron::job::multiple { "backup_psql_$pg_host": 39 cron::job::multiple { "backup_psql_$pg_host":
35 ensure => "present", 40 ensure => "present",
36 require => [File[$pg_backup_path], File[$pg_path]], 41 require => [File[$pg_backup_path], File[$pg_path]],
37 jobs => [ 42 jobs => [
38 { 43 {
39 command => "/usr/bin/pg_dumpall -h $pg_path$pg_port_arg -f $pg_backup_path/\$(date -Iseconds).sql", 44 command => "/usr/local/sbin/backup_psql_$pg_host.sh",
40 user => $pg_user, 45 user => $pg_user,
41 hour => "22,4,10,16", 46 hour => "22,4,10,16",
42 minute => 0, 47 minute => 0,
@@ -57,7 +62,7 @@ define profile::postgresql::backup_dump (
57 require => [File[$pg_backup_path], File[$pg_path]], 62 require => [File[$pg_backup_path], File[$pg_path]],
58 jobs => [ 63 jobs => [
59 { 64 {
60 command => "/usr/bin/pg_dumpall -h $pg_path$pg_port_arg -f $pg_backup_path/\$(date -Iseconds).sql", 65 command => "/usr/local/sbin/backup_psql_$pg_host.sh",
61 user => $pg_user, 66 user => $pg_user,
62 hour => "22,4,10,16", 67 hour => "22,4,10,16",
63 minute => 0, 68 minute => 0,