X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=ziva-backup-check;h=5c2ed56d9b749d1b91b256fb5c50f7f579500d30;hb=ef708570f1f42d9bb54ddc5b7b0432de4f761eb0;hp=1d5e4328761cbb1dfac71eda27ccb87445bb5b23;hpb=4b3f043829a57215e1251122a8ab0019b717ca8d;p=distro-setup diff --git a/ziva-backup-check b/ziva-backup-check index 1d5e432..5c2ed56 100755 --- a/ziva-backup-check +++ b/ziva-backup-check @@ -2,7 +2,7 @@ # Copyright (C) 2019 Ian Kelling # SPDX-License-Identifier: AGPL-3.0-or-later -source /a/bin/errhandle/err +source /a/bin/bash-bear-trap/bash-bear [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@" @@ -18,14 +18,14 @@ fi ## begin check on btrbk -age_limit_sec=$(( 60 * 60 * 74 )) # 74 hours +age_limit_sec=$(( 60 * 60 * 24 * 7 )) # 7 days. for prefix in root boot; do if [[ $prefix == boot ]]; then # its not uncommon for the /boot subvol to have no changes, and thus # no new backups for 10 days or so. todo: instead of this error # prone check, we should make it so the ziva computer will # touch a file on our computer whenever btrbk succeeds - age_limit_sec=$(( age_limit_sec + 60* 60 * 24 * 15 )) + age_limit_sec=$(( age_limit_sec + 60* 60 * 24 * 35 )) fi vol=${prefix}_ubuntubionic snaps=(/mnt/r7/amy/$prefix/btrbk/${vol}.20*)