From a8945a467dbf262a7ae99449e3c96e4eea4132d1 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 16 Aug 2025 11:11:36 +1000 Subject: [PATCH] tweak to allow for 7 day lag with mara to borric backup --- backup-success | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/backup-success b/backup-success index f9518d8..55d6098 100755 --- a/backup-success +++ b/backup-success @@ -1,12 +1,5 @@ #!/bin/bash -# check for Presence videos being sync'd // convert to eufy when I get time -#cnt=`sudo find /export/backup/Presence/ -name '*.mp4' -mtime -2 | wc -l` -#if [ $cnt = 0 ]; then -# echo "No Presence videos in the last 24 hours have been synced" -# exit -1 -#fi - now="$(date +%s)" # see if backup was 1 day or more ago (just in case we rsync broken data) @@ -14,30 +7,22 @@ lastUpdate="$(stat -c %Y /home/ddp/tmp/bw-bkup.log)" let diff_in_days="(${now}-${lastUpdate})/(3600*24)" if [ $diff_in_days -gt 1 ]; then - echo "bitwarden not backed up to DU in last 24 hours!" + echo ": bitwarden not backed up to DU" exit -1 fi -# see if backup was 1 day or more ago (just in case we rsync broken data) +# see if backup was 7 days or more ago (just in case we rsync broken data) lastUpdate="$(stat -c %Y /home/ddp/tmp/last_mara_bkup)" let diff_in_days="(${now}-${lastUpdate})/(3600*24)" -if [ $diff_in_days -gt 3 ]; then - echo "mara not backed up to borric in last 3 days!" - exit -1 -fi - -# check to see if docker tried to update images last night -lastUpdate="$(stat -c %Y /srv/docker/log/update-docker.log)" -let diff_in_days="(${now}-${lastUpdate})/(3600*24)" -if [ $diff_in_days -gt 1 ]; then - echo "watchtower did not run in last 24 hours!" +if [ $diff_in_days -gt 7 ]; then + echo ": mara not backed up to borric" exit -1 fi ret=`/home/ddp/bin/restic-success` if [ $? -ne 0 ]; then - echo "restic backups failed?" + echo ": restic backups failed" exit -1 fi