diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-08-16 13:58:49 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-08-16 13:58:49 -0300 |
commit | f7411312258b5b42295a8d9c0df81304b60cde2f (patch) | |
tree | 07615f860c78112c7b2ae3fd8e133dc220b814ac /manifests | |
parent | b601beed0a88714bb26b70ed0f40b45f29dc7ab2 (diff) | |
download | puppet-backup-f7411312258b5b42295a8d9c0df81304b60cde2f.tar.gz puppet-backup-f7411312258b5b42295a8d9c0df81304b60cde2f.tar.bz2 |
Adding backup::rsync
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 35 |
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, |