diff options
| author | St33v <github@f3rr3t.com> | 2020-03-28 15:56:24 +1100 |
|---|---|---|
| committer | St33v <github@f3rr3t.com> | 2020-03-28 15:56:24 +1100 |
| commit | fedc5d679064cf84d272cfdc0dd4f1f3c132eba7 (patch) | |
| tree | 7ccb933435d0f816e310da25d1856c928315fbdd /borgAuto.sh | |
| parent | afc97156a19f4aa345fe236b73971c55589dda5f (diff) | |
Log pruning
This is a secondary comment (description)
Diffstat (limited to 'borgAuto.sh')
| -rwxr-xr-x | borgAuto.sh | 7 |
1 files changed, 4 insertions, 3 deletions
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 \ |
