aboutsummaryrefslogtreecommitdiff
path: root/manifests/rdiff.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/rdiff.pp')
-rw-r--r--manifests/rdiff.pp19
1 files changed, 9 insertions, 10 deletions
diff --git a/manifests/rdiff.pp b/manifests/rdiff.pp
index 587c02d..6c692c7 100644
--- a/manifests/rdiff.pp
+++ b/manifests/rdiff.pp
@@ -16,7 +16,8 @@
# directories.
#
define backupninja::rdiff(
- $order = 90, $ensure = present, $user = false, $home = false, $host = false,
+ $order = 90, $ensure = present, $user = false,
+ $home = "/home/${user}-${name}", $host = false,
$type = 'local',
$exclude = [ "/home/*/.gnupg", "/home/*/.local/share/Trash", "/home/*/.Trash",
"/home/*/.thumbnails", "/home/*/.beagle", "/home/*/.aMule",
@@ -25,27 +26,23 @@ define backupninja::rdiff(
"/home", "/usr/local/*bin", "/var/lib/dpkg/status*" ],
$vsinclude = false, $keep = 30, $sshoptions = false, $options = '--force', $ssh_dir_manage = true,
$ssh_dir = false, $authorized_keys_file = false, $installuser = true, $installkey = true, $key = false,
- $backuptag = false, $home = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false, $nagios2_description = 'backups')
+ $backuptag = false, $backupkeytype = "rsa", $backupkeystore = false, $extras = false, $nagios2_description = 'backups')
{
include backupninja::client::rdiff_backup
+ $directory = "$home/rdiff-backup/"
+
case $type {
'remote': {
case $host { false: { err("need to define a host for remote backups!") } }
$real_backuptag = $backuptag ? {
- false => "backupninja-$host",
+ false => "backupninja-$fqdn",
default => $backuptag
}
- $real_home = $home ? {
- false => "/home/${user}-${name}",
- default => $home,
- }
- $directory = "$real_home/rdiff-backup/"
-
backupninja::server::sandbox
{
- "${user}-${name}": user => $user, host => $fqdn, dir => $real_home,
+ "${user}-${name}": user => $user, host => $fqdn, dir => $home,
manage_ssh_dir => $ssh_dir_manage, ssh_dir => $ssh_dir, key => $key,
authorized_keys_file => $authorized_keys_file, installuser => $installuser,
backuptag => $real_backuptag, keytype => $backupkeytype, backupkeys => $backupkeystore,
@@ -61,6 +58,8 @@ define backupninja::rdiff(
}
}
}
+
+
file { "${backupninja::client::defaults::configdir}/${order}_${name}.rdiff":
ensure => $ensure,
content => template('backupninja/rdiff.conf.erb'),