From 617d2d164d46abc78a98ff08e4b7e583f3727c13 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 19 Sep 2024 08:22:19 -0700 Subject: [PATCH] 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 --- roles/postgresql_server/templates/cron-backup-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/postgresql_server/templates/cron-backup-database b/roles/postgresql_server/templates/cron-backup-database index 777d6e370b..d7bc4aee80 100644 --- a/roles/postgresql_server/templates/cron-backup-database +++ b/roles/postgresql_server/templates/cron-backup-database @@ -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 %}