diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-18 18:03:02 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-18 18:03:02 -0500 |
commit | dabf1dba0dfe48a67ff551f065415fe8e17b3b10 (patch) | |
tree | 6a79845a3b96676227fde3d0bf2be86c9865f838 /modules/partofme | |
parent | 9856bdc1b2a354a835619cef0da4e348f45960c5 (diff) | |
download | puppet-tozt-dabf1dba0dfe48a67ff551f065415fe8e17b3b10.tar.gz puppet-tozt-dabf1dba0dfe48a67ff551f065415fe8e17b3b10.zip |
create a duplicati backup on partofme
Diffstat (limited to 'modules/partofme')
-rw-r--r-- | modules/partofme/manifests/backups.pp | 7 | ||||
-rw-r--r-- | modules/partofme/templates/duplicati-partofme.json | 73 |
2 files changed, 78 insertions, 2 deletions
diff --git a/modules/partofme/manifests/backups.pp b/modules/partofme/manifests/backups.pp index 080596c..948a9b8 100644 --- a/modules/partofme/manifests/backups.pp +++ b/modules/partofme/manifests/backups.pp @@ -1,9 +1,12 @@ class partofme::backups { - include duplicati - syncthing::user { $::default_user: } + $encrypt_passphrase = secret::value('duplicati') + duplicati::backup { "partofme": + content => template('partofme/duplicati-partofme.json'); + } + file { '/usr/local/bin/sftp-only': content => 'exec false', mode => '0755'; diff --git a/modules/partofme/templates/duplicati-partofme.json b/modules/partofme/templates/duplicati-partofme.json new file mode 100644 index 0000000..b0fae06 --- /dev/null +++ b/modules/partofme/templates/duplicati-partofme.json @@ -0,0 +1,73 @@ +{ + "CreatedByVersion": "2.0.4.4", + "Schedule": { + "ID": 1, + "Tags": [ + "ID=1" + ], + "Time": "2018-11-19T18:00:00Z", + "Repeat": "1D", + "LastRun": "0001-01-01T05:00:00Z", + "Rule": "AllowedWeekDays=Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", + "AllowedDays": [ + "mon", + "tue", + "wed", + "thu", + "fri", + "sat", + "sun" + ] + }, + "Backup": { + "ID": "1", + "Name": "partofme", + "Description": "", + "Tags": [], + "TargetURL": "file:///media/persistent/duplicati/backups/partofme", + "DBPath": "/media/persistent/duplicati/.config/Duplicati/90657175837370896667.sqlite", + "Sources": [ + "/etc/", + "/home/" + ], + "Settings": [ + { + "Filter": "", + "Name": "encryption-module", + "Value": "aes", + "Argument": null + }, + { + "Filter": "", + "Name": "compression-module", + "Value": "zip", + "Argument": null + }, + { + "Filter": "", + "Name": "dblock-size", + "Value": "50mb", + "Argument": null + }, + { + "Filter": "", + "Name": "passphrase", + "Value": "<%= @encrypt_passphrase %>", + "Argument": null + }, + { + "Filter": "", + "Name": "retention-policy", + "Value": "1W:1D,4W:1W,12M:1M", + "Argument": null + } + ], + "Filters": [], + "Metadata": {}, + "IsTemporary": false + }, + "DisplayNames": { + "/etc/": "etc", + "/home/": "home" + } +} |