1
0
Fork 0
forked from infra/ansible

Use chronic for datanommer daily export

Signed-off-by: Michael Winters <fedora@mwinters.net>
This commit is contained in:
Michael Winters 2026-04-02 10:01:16 -05:00 committed by Kevin Fenzi
commit 8ac48ade3b
2 changed files with 12 additions and 1 deletions

View file

@ -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')

View file

@ -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 %}