changed cronjob settings

This commit is contained in:
nd 2020-04-18 23:08:08 +02:00
parent 1a73441d47
commit 20ba6f1126
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -49,15 +49,15 @@
- name: add backup cronjob for easier backup/restore
cron:
name: db backup
job: '/usr/bin/pg_dumpall | gzip > /opt/postgresbackup/$(date "+%s-%Y%M%d-%H%M.sql.gz")'
job: '/usr/bin/pg_dumpall | gzip > /opt/postgresbackup/$(date "+\%Y\%m\%d-\%H\%M.sql.gz")'
user: postgres
hour: 5,11,17,23
hour: */4
minute: 45
- name: add backup cleanup cronjob
cron:
name: db backup cleanup
job: 'find /opt/postgresbackup/* -mtime +9 -type f -exec rm {} \;'
job: 'find /opt/postgresbackup/* -mtime +3 -type f -exec rm {} \;'
special_time: daily
- name: flush handlers so postgres is ready before other roles try to use it