summaryrefslogtreecommitdiff
path: root/pruner.sh
diff options
context:
space:
mode:
authorSt33v <github@f3rr3t.com>2020-03-04 15:14:24 +1100
committerSt33v <github@f3rr3t.com>2020-03-04 15:14:24 +1100
commitd68ffdebeab00be77068e1f38655b70eeac42014 (patch)
treeeecfb18a5c99d4d32a8f36f94d25a6ded9cda623 /pruner.sh
parent61b9a36443261fb765eff60ea29592e307635f89 (diff)
testfile for pruning. It does not harm repos bc --dry-run
Diffstat (limited to 'pruner.sh')
-rwxr-xr-xpruner.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/pruner.sh b/pruner.sh
new file mode 100755
index 0000000..7b86d23
--- /dev/null
+++ b/pruner.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/bash
+function Pruner {
+ echo 'Hello' $1 There are $# arguments
+ if [ $# -eq 1 ]; then
+ borg prune \
+ --prefix $1 \
+ --list \
+ --dry-run \
+ --keep-within 1d \
+ --keep-daily 2 \
+ --keep-weekly 8 \
+ --keep-monthly 12 \
+ --keep-yearly -1 \
+ ::
+ else
+ # sds
+ echo Pruner went wrong.
+ fi
+}
+
+
+Pruner $1