From fedc5d679064cf84d272cfdc0dd4f1f3c132eba7 Mon Sep 17 00:00:00 2001 From: St33v Date: Sat, 28 Mar 2020 15:56:24 +1100 Subject: Log pruning This is a secondary comment (description) --- borgAuto.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'borgAuto.sh') diff --git a/borgAuto.sh b/borgAuto.sh index ed5564d..36f80b1 100755 --- a/borgAuto.sh +++ b/borgAuto.sh @@ -21,14 +21,15 @@ function Differ { changeFiles=$(awk -v tot=$totFiles -v a=$addFiles -v r=$remFiles 'BEGIN {print tot - a - r}') if [ ${totFiles} -eq 0 ]; then echo "No changes, additions or deletions since last backup" - elif [ ${totFiles} -gt ${MAXFILES} ]; then + elif [ ${totFiles} -gt ${MAXFILES} ]; then # Lots of changes #echo $(head ${diffTmpFile}) head ${diffTmpFile} midFiles=$(awk -v tot=$totFiles -v max=$MAXFILES 'BEGIN {print tot - max}') echo " ... ${midFiles} more changes (Changed $changeFiles, Added ${addFiles}, Removed ${remFiles})" tail ${diffTmpFile} - else + else # A 'small' number of changes + echo ${totFiles} files changed: cat ${diffTmpFile} fi rm ${diffTmpFile} @@ -42,7 +43,7 @@ function Pruner { borg prune \ --prefix $1 \ --list \ - --dry-run \ + --stats \ --keep-within 3d \ --keep-daily 14 \ --keep-weekly 8 \ -- cgit v1.3