aboutsummaryrefslogtreecommitdiff
path: root/manifests/pgsql.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-04-14 12:33:39 +0200
committervarac <varacanero@zeromail.org>2013-04-14 12:33:39 +0200
commit2ce6a99e0e0fdfd4555c5e6c15731a7fae45da2e (patch)
treece3c76d6559e4cea4a48e1b8b45c3e477019eb61 /manifests/pgsql.pp
parentea5cf965fc63ba39507de5e68f39563b87b7f0bc (diff)
parentdaeb1a1f112a4dbf6b39565f0dea461e46a64681 (diff)
downloadpuppet-backupninja-2ce6a99e0e0fdfd4555c5e6c15731a7fae45da2e.tar.gz
puppet-backupninja-2ce6a99e0e0fdfd4555c5e6c15731a7fae45da2e.tar.bz2
Merge branch 'master' of code.leap.se:puppet_backupninja into nadir_master
Diffstat (limited to 'manifests/pgsql.pp')
-rw-r--r--manifests/pgsql.pp29
1 files changed, 29 insertions, 0 deletions
diff --git a/manifests/pgsql.pp b/manifests/pgsql.pp
new file mode 100644
index 0000000..07fab32
--- /dev/null
+++ b/manifests/pgsql.pp
@@ -0,0 +1,29 @@
+# Safe PGSQL dumps, as part of a backupninja run.
+#
+# Valid attributes for this type are:
+#
+# order: The prefix to give to the handler config filename, to set
+# order in which the actions are executed during the backup run.
+#
+# ensure: Allows you to delete an entry if you don't want it any more
+# (but be sure to keep the configdir, name, and order the same, so
+# that we can find the correct file to remove).
+#
+# backupdir, compress, configfile: As defined in the
+# backupninja documentation, with the caveat that hotcopy, sqldump,
+# and compress take true/false rather than yes/no.
+#
+define backupninja::pgsql(
+ $order = 10, $ensure = present, $databases = 'all', $backupdir = "/var/backups/postgres", $compress = true, $vsname = false)
+{
+
+ include backupninja::client::defaults
+ file { "${backupninja::client::defaults::configdir}/${order}_${name}.pgsql":
+ ensure => $ensure,
+ content => template('backupninja/pgsql.conf.erb'),
+ owner => root,
+ group => root,
+ mode => 0600,
+ require => File["${backupninja::client::defaults::configdir}"]
+ }
+}