aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2009-08-27 20:50:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2009-08-27 20:50:23 -0300
commit73993f09fe8e479706084f47da833796b131a45a (patch)
tree8a5843044ab08445e0927e43240760e75481e598
parent149cba805ca00077bc8cd663542ee755516b032a (diff)
parent08d43f8c6d6a60f456cb82f2fb270f48470c96d7 (diff)
downloadpuppet-backupninja-73993f09fe8e479706084f47da833796b131a45a.tar.gz
puppet-backupninja-73993f09fe8e479706084f47da833796b131a45a.tar.bz2
Merge branch 'master' of git://labs.riseup.net/module_backupninja
-rw-r--r--manifests/dup.pp26
-rw-r--r--manifests/rdiff.pp3
2 files changed, 19 insertions, 10 deletions
diff --git a/manifests/dup.pp b/manifests/dup.pp
index 9b554dc..5e58c2b 100644
--- a/manifests/dup.pp
+++ b/manifests/dup.pp
@@ -30,21 +30,25 @@
#
# Some notes about this handler:
#
+# - When specifying a password, be sure to enclose it in single quotes,
+# this is particularly important if you have any special characters, such
+# as a $ which puppet will attempt to interpret resulting in a different
+# password placed in the file than you expect!
# - There's no support for a 'local' type in backupninja's duplicity
# handler on version 0.9.6-4, which is the version available in stable and
# testing debian repositories by the time of this writing.
define backupninja::duplicity( $order = 90,
$ensure = present,
# options to the config file
- $options = false, #
- $nicelevel = 0, #
- $testconnect = "yes", #
- $tmpdir = "/var/tmp/duplicity", #
+ $options = false,
+ $nicelevel = false,
+ $testconnect = false,
+ $tmpdir = false,
# [gpg]
- $sign = "no",
+ $sign = false,
$encryptkey = false,
$signkey = false,
- $password = "a_very_complicated_passphrase",
+ $password = false,
# [source]
$include = [ "/var/spool/cron/crontabs",
"/var/backups",
@@ -67,10 +71,10 @@ define backupninja::duplicity( $order = 90,
$vsinclude = false,
# [dest]
$incremental = "yes",
- $keep = 60,
- $bandwithlimit = "0",
+ $keep = false,
+ $bandwithlimit = false,
$sshoptions = false,
- $destdir = "/backups",
+ $destdir = false,
$desthost = false,
$destuser = false,
# configs to backupninja client
@@ -88,7 +92,9 @@ define backupninja::duplicity( $order = 90,
# the client with configs for this machine
include backupninja::client
- case $host { false: { err("need to define a host for remote backups!") } }
+ case $desthost { false: { err("need to define a destination host for remote backups!") } }
+ case $destdir { false: { err("need to define a destination directory for remote backups!") } }
+ case $password { false: { err("a password is necessary either to unlock the GPG key, or for symmetric encryption!") } }
# guarantees there's a configured backup space for this backup
backupninja::server::sandbox { "${user}-${name}":
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index 2eb1d9b..d34fc88 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -28,6 +28,9 @@ define backupninja::rdiff(
$backuptag = false, $home = false, $backupkeytype = '')
{
include backupninja::client
+
+ case $directory { false: { err("need to define a directory for where the backups should go!") } }
+
case $type {
'remote': {
case $host { false: { err("need to define a host for remote backups!") } }