Fix healthcheck caching volume
This commit is contained in:
parent
8261031e11
commit
dd8a61792f
3 changed files with 4 additions and 4 deletions
|
|
@ -49,4 +49,4 @@ borg compact --threshold=5 --cleanup-commits --verbose --progress
|
|||
btrfs subvolume delete /snapshot/source
|
||||
|
||||
echo "Finished backup script at `date`"
|
||||
date > /backup_completion_time.log # this used by the healtcheck
|
||||
date > /health/backup_completion_time.log # this used by the healtcheck
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ -f /backup_completion_time.log ]; then
|
||||
if [ -f /health/backup_completion_time.log ]; then
|
||||
current_time=$(date +%s)
|
||||
backup_time=$(date --file /backup_completion_time.log +%s)
|
||||
backup_time=$(date --file /health/backup_completion_time.log +%s)
|
||||
age_in_seconds=$((current_time - backup_time))
|
||||
|
||||
if [ ${age_in_seconds} -lt ${MAX_BACKUP_AGE_SECONDS} ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue