postgres / db-datanommer: use lock-wrapper for backups

It seems sometimes now db-datanommer is taking more than 24hours to
backup, and currently that means it starts another one while the
previous one is running. Thats no good for anyone, so lets put in a lock
wrapper to avoid that.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2024-09-19 08:22:19 -07:00
parent 794c6786e2
commit 617d2d164d

View file

@ -1,5 +1,5 @@
{% if inventory_hostname == 'db-datanommer02.iad2.fedoraproject.org' %}
0 0 * * * postgres /usr/local/bin/backup-database {{ item }} |& grep -Ev 'warning:|hypertable|chunk|restore|data-only|continuous_agg'
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'"
{% else %}
0 0 * * * postgres /usr/local/bin/backup-database {{ item }}
{% endif %}