My backup scripts and tools
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prune.sh 599 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. BORG="$(dirname "$0")/borg.sh --rw"
  3. set -e
  4. if [ "$BORG_RW_KEY_ADDED" != "1" ] ; then
  5. echo "Re-executing under a new ssh agent"
  6. exec env BORG_RW_KEY_ADDED=1 ssh-agent "$0"
  7. fi
  8. echo "=== Please enter SSH key passphrase. Check Bitwarden for:"
  9. echo "=== borg basis / read-write SSH key"
  10. ssh-add -v "$(realpath "$(dirname "$0")")/ssh/id_ecdsa"
  11. $BORG prune \
  12. --verbose \
  13. --progress \
  14. --stats \
  15. --keep-within=7d \
  16. --keep-daily=14 \
  17. --keep-weekly=8 \
  18. --keep-monthly=-1
  19. $BORG compact \
  20. --verbose \
  21. --progress