summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests/backup.pp
blob: a9771776ef24c141987589ec9d88a830ec6090e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class site_couchdb::backup {

  # general backupninja config
  class { 'backupninja':
    usecolors => false
  }

  # dump all DBs locally to /var/backups/couchdb once a day
  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',
  }

}