tweak to allow for 7 day lag with mara to borric backup
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user