diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-21 11:51:05 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-21 11:51:05 +0100 |
commit | fe3d2db3d7e942f987fa3b4bdc44efd7cc802ef2 (patch) | |
tree | 6adc6cb630cb63008e88222d68e6487afb37576b | |
parent | Set up raspberry pi builder. (diff) | |
download | profiles-fe3d2db3d7e942f987fa3b4bdc44efd7cc802ef2.tar.gz profiles-fe3d2db3d7e942f987fa3b4bdc44efd7cc802ef2.tar.xz |
Puppetdb dump database every 30 min.
-rw-r--r-- | manifests/puppetdb.pp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/manifests/puppetdb.pp b/manifests/puppetdb.pp index b321433..3f8ca0b 100644 --- a/manifests/puppetdb.pp +++ b/manifests/puppetdb.pp @@ -18,4 +18,17 @@ class profiles::puppetdb { # profiles::puppetserver is also pulled in. create_puppet_service_resource => false, } + + file { '/var/tmp/pg_dump': + ensure => directory, + owner => 'postgres', + } + + cron { 'dump database': + ensure => present, + command => 'pg_dump puppetdb > /var/tmp/pg_dump/puppetdb-$(date -u -Iseconds).sql', + user => 'postgres', + hour => '*', + minute => '30', + } } |