diff options
| author | St33v <github@f3rr3t.com> | 2020-03-04 15:15:08 +1100 |
|---|---|---|
| committer | St33v <github@f3rr3t.com> | 2020-03-04 15:15:08 +1100 |
| commit | 8efec0edecd4073f384979e9dd04c9d962275c19 (patch) | |
| tree | 31ae18ff18a665f131f4688b3fcc0bf760c198cf | |
| parent | d68ffdebeab00be77068e1f38655b70eeac42014 (diff) | |
now with prefixed pruning
| -rwxr-xr-x | borgAuto.sh | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/borgAuto.sh b/borgAuto.sh index e7dae77..ed5564d 100755 --- a/borgAuto.sh +++ b/borgAuto.sh @@ -37,11 +37,10 @@ function Differ { # Pruning must be performed on named repos, otherwise just the last one # from a period (day/week/etc) is kept. function Pruner { + # todo : replace --dry-run with --stats (they can't both be used) if [ $# -eq 1 ]; then - borg \ + borg prune \ --prefix $1 \ - prune \ - --stats \ --list \ --dry-run \ --keep-within 3d \ @@ -51,12 +50,10 @@ function Pruner { --keep-yearly -1 \ :: else - # sds - echo Pruner went wrong. + echo Pruner went wrong. Call it with just one prefix. fi } - # Backup all of /home except a few excluded directories and files echo $'\nCreating St33v\'s archive' borg create -v --stats --compression auto,lzma,6 \ @@ -64,14 +61,9 @@ borg create -v --stats --compression auto,lzma,6 \ /home/st33v \ /var/log/pacman.log \ /etc/systemd/system \ - --exclude '/home/st33v/.cache' \ - --exclude '/home/st33v/.local' \ --exclude '/home/$USER/cargo' \ - --exclude '/home/st33v/.dropbox' \ - --exclude '/home/st33v/.dropbox-dist' \ - --exclude '/home/st33v/.config' \ - --exclude '/home/st33v/.mozilla' \ --exclude '/home/st33v/.*' \ + --exclude '*.vdi' \ --exclude '*.img' \ --exclude '*.iso' |
