From 6fcd388219642f8548e3d72a4260bf3f01ff2ed9 Mon Sep 17 00:00:00 2001 From: Benoit Vianin Date: Sun, 19 Nov 2023 09:52:58 +0000 Subject: [PATCH 1/2] Fix bug on time_wait calculation --- install/assets/functions/10-db-backup | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index 14d4ab3..e54de6b 100644 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -1989,8 +1989,7 @@ timer() { print_debug "[timer] [datetime] Difference in seconds: ${time_wait}" if (( ${time_wait} < 0 )); then - time_wait=$(( (${time_wait} + (${backup_job_backup_interval} - 1)) / (${backup_job_backup_interval} * 60) )) - time_wait=$(( ${time_wait} * -1 )) + time_wait=$(( ${backup_job_backup_interval} * 60 - ${time_wait} * -1 % (${backup_job_backup_interval} * 60) )) print_debug "[timer] [datetime] Difference in seconds (rounded) time_wait is in the past : ${time_wait}" fi From ab3c5230282ba2eafc15d98673ee0f694f783cd6 Mon Sep 17 00:00:00 2001 From: Benoit Vianin Date: Sun, 19 Nov 2023 10:59:22 +0000 Subject: [PATCH 2/2] Fix backup cleanup #281 --- install/assets/functions/10-db-backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index e54de6b..c2d375e 100644 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -1025,7 +1025,7 @@ cleanup_old_data() { if var_true "${DEBUG_CLEANUP_OLD_DATA}" ; then debug on; fi if [ -n "${backup_job_cleanup_time}" ]; then if [ "${master_exit_code}" != 1 ]; then - case "${backup_job_backup_location,,}" in + case "${backup_job_backup_location}" in "blobxfer" ) write_log info "Cleaning up old backups on filesystem" run_as_user mkdir -p "${backup_job_filesystem_path}"