reducing backup amounts parameterizing for later changes. should reduce cache sizes

This commit is contained in:
Andrew Davidson 2023-08-18 09:04:01 -07:00
parent c734a085e7
commit a406cfe849
Signed by: amd
SSH key fingerprint: SHA256:6jDSUhitcXG0Nrh/g8Gy8ZJdsZ5LzPJlaGmGKUGfP5k

View file

@ -181,23 +181,27 @@ else
;;
"prune")
if [[ $AC_POWER == 1 ]]; then
hourly=6
daily=7
monthly=12
yearly=5
echo """
Pruning backups at $DESTINATION ...
Keeping:
- 24 hourly backups
- 90 daily backups
- 12 monthly backups
- 5 yearly backups
- $hourly hourly backups
- $daily daily backups
- $monthly monthly backups
- $yearly yearly backups
""" | print_and_log
/usr/bin/restic \
RESTIC \
-r "$BACKUP_REPOSITORY" \
-p "$BACKUP_PASSWORD" \
--verbose \
--prune \
--keep-hourly=24 \
--keep-daily=90 \
--keep-monthly=12 \
--keep-yearly=5 \
--keep-hourly=$hourly \
--keep-daily=$daily \
--keep-monthly=$monthly \
--keep-yearly=$yearly \
forget | print_and_log
else
echo "Not plugged in, canceling prune."