Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

wal-g: Write out a logfile.

Alex Vandiver2f4775ba6815
diff --git a/puppet/zulip/files/cron.d/pg-backup-and-purge b/puppet/zulip/files/cron.d/pg-backup-and-purge
index ba186c2c292..dcf077962e5 100644
--- a/puppet/zulip/files/cron.d/pg-backup-and-purge
+++ b/puppet/zulip/files/cron.d/pg-backup-and-purge
@@ -1,3 +1,3 @@
PATH=/bin:/usr/bin:/usr/local/bin
-0 2 * * * postgres /usr/local/bin/pg_backup_and_purge
+0 2 * * * postgres /usr/local/bin/pg_backup_and_purge >/var/log/pg_backup_and_purge.log 2>&1
diff --git a/puppet/zulip/manifests/postgresql_backups.pp b/puppet/zulip/manifests/postgresql_backups.pp
index 52d7396c544..80153cb41e7 100644
--- a/puppet/zulip/manifests/postgresql_backups.pp
+++ b/puppet/zulip/manifests/postgresql_backups.pp
@@ -4,6 +4,12 @@ class zulip::postgresql_backups {
include zulip::postgresql_common
include zulip::wal_g
+ file { '/var/log/pg_backup_and_purge.log':
+ ensure => file,
+ owner => 'postgres',
+ group => 'postgres',
+ mode => '0644',
+ }
file { '/usr/local/bin/pg_backup_and_purge':
ensure => file,
owner => 'root',
@@ -38,7 +44,10 @@ class zulip::postgresql_backups {
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/cron.d/pg-backup-and-purge',
- require => File['/usr/local/bin/pg_backup_and_purge'],
+ require => [
+ File['/var/log/pg_backup_and_purge.log'],
+ File['/usr/local/bin/pg_backup_and_purge'],
+ ],
}
file { "${zulip::common::nagios_plugins_dir}/zulip_postgresql_backups":