summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-12-19 12:50:17 +0100
committervarac <varacanero@zeromail.org>2013-12-19 12:50:17 +0100
commite0c07465d14d701da16e47b9c2e3938c80088c4d (patch)
tree6daad6c140eca254bc3ec2e31cdffa3945e92f05 /puppet
parent2308bc185d23638a20422dfd98c670fa143b32ff (diff)
Deploy /etc/leap/couchdb_scripts_defaults.conf so we can exclude some DBs, i.e. sessions + tokens (#4794)
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_couchdb/files/couchdb_scripts_defaults.conf4
-rw-r--r--puppet/modules/site_couchdb/manifests/backup.pp11
2 files changed, 15 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/files/couchdb_scripts_defaults.conf b/puppet/modules/site_couchdb/files/couchdb_scripts_defaults.conf
new file mode 100644
index 00000000..1565e1a1
--- /dev/null
+++ b/puppet/modules/site_couchdb/files/couchdb_scripts_defaults.conf
@@ -0,0 +1,4 @@
+# space separated list of excluded DBs for dumping
+# sourced by couchdb_dumpall.sh
+EXCLUDE_DBS='sessions tokens'
+
diff --git a/puppet/modules/site_couchdb/manifests/backup.pp b/puppet/modules/site_couchdb/manifests/backup.pp
index ef505693..8b5aa6ea 100644
--- a/puppet/modules/site_couchdb/manifests/backup.pp
+++ b/puppet/modules/site_couchdb/manifests/backup.pp
@@ -9,4 +9,15 @@ class site_couchdb::backup {
backupninja::sh { 'couchdb_backup':
command_string => "cd /srv/leap/couchdb/scripts \n./couchdb_dumpall.sh"
}
+
+ # Deploy /etc/leap/couchdb_scripts_defaults.conf so we can exclude
+ # some databases
+
+ file { '/etc/leap/couchdb_scripts_defaults.conf':
+ source => 'puppet:///modules/site_couchdb/couchdb_scripts_defaults.conf',
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ }
+
}