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.
 
 
 

27 lines
605 B

  1. #!/bin/bash
  2. set -e
  3. . "$(dirname "$0")"/vars.sh
  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 $HOSTNAME / read-write SSH key"
  10. ssh-add -v "$(realpath "$(dirname "$0")")/ssh/id_ecdsa"
  11. $BORG --rw 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 --rw compact \
  20. --verbose \
  21. --progress