aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-08-16 13:58:49 -0300
committerSilvio Rhatto <rhatto@riseup.net>2010-08-16 13:58:49 -0300
commitf7411312258b5b42295a8d9c0df81304b60cde2f (patch)
tree07615f860c78112c7b2ae3fd8e133dc220b814ac /manifests
parentb601beed0a88714bb26b70ed0f40b45f29dc7ab2 (diff)
downloadpuppet-backup-f7411312258b5b42295a8d9c0df81304b60cde2f.tar.gz
puppet-backup-f7411312258b5b42295a8d9c0df81304b60cde2f.tar.bz2
Adding backup::rsync
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp35
1 files changed, 35 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d8fb436..cdfc838 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -106,6 +106,32 @@ class backup {
}
}
+ define rsync($port = '22', $ensure = present, $installkey = true, $bandwidthlimit = false) {
+ backupninja::rdiff { "rdiff-$title.$domain":
+ # [general]
+ ensure => $ensure,
+ user => "$hostname",
+ host => "$title.$domain",
+ format => 'long',
+ home => "$backupdir/remote/$fqdn",
+ backupdir => "$backupdir/remote/$fqdn/rsync",
+ backupkeytype => "dsa",
+ backupkeystore => "puppet://$server/files/keys",
+ # [source]
+ include => $backup_include_encrypted,
+ exclude => $backup_exclude_encrypted,
+ # [dest]
+ dest => "remote",
+ port => $port,
+ installkey => $installkey,
+ keepdaily => '7',
+ keepweekly => '4',
+ keepmonthly => '3',
+ bandwidthlimit => false,
+ compress => '1',
+ }
+ }
+
# local backups using duplicity
define duplicity($encryptkey = false,
$password = false,
@@ -121,6 +147,15 @@ class backup {
include backupninja::client
+ # we have to keep that until squeeze turns stable
+ file { "/usr/share/backupninja/rsync":
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ source => "puppet://$server/backup/files/handlers/rsync",
+ }
+
# backup dest folder
file { "$backupdir/duplicity":
ensure => directory,