forked from infra/ansible
Use chronic for datanommer daily export
Signed-off-by: Michael Winters <fedora@mwinters.net>
This commit is contained in:
parent
70088899eb
commit
8ac48ade3b
2 changed files with 12 additions and 1 deletions
|
|
@ -1,4 +1,15 @@
|
|||
---
|
||||
- name: Install moreutils
|
||||
ansible.builtin.package:
|
||||
state: present
|
||||
name:
|
||||
- moreutls # provides `chronic` for use with cron emails
|
||||
when: inventory_hostname.startswith('db-datanommer02.rdu3')
|
||||
tags:
|
||||
- datanommer
|
||||
- postgresql
|
||||
|
||||
|
||||
- name: Ensure datanommer incremental backups have a destination directory
|
||||
ansible.builtin.file: dest=/backups/datanommer-incremental state=directory owner=postgres
|
||||
when: inventory_hostname.startswith('db-datanommer02.rdu3')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{% if inventory_hostname == 'db-datanommer02.rdu3.fedoraproject.org' %}
|
||||
0 0 * * * postgres /usr/local/bin/lock-wrapper backup-database "/usr/local/bin/backup-database {{ item }} |& grep -Ev 'warning:|hypertable|chunk|restore|data-only|continuous_agg'"
|
||||
0 3 * * * postgres /usr/local/bin/datanommer-export-day
|
||||
0 3 * * * postgres chronic /usr/local/bin/datanommer-export-day
|
||||
{% else %}
|
||||
0 0 * * * postgres /usr/local/bin/backup-database {{ item }}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue