summaryrefslogtreecommitdiff
path: root/d-backup
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2020-10-25 20:27:52 +0500
committerAnton Bobov <abobov@gmail.com>2020-10-25 20:27:52 +0500
commit98fea5f02034cb1f3b83b6c4c7dae757ac4b1c1d (patch)
treeee4cacd87d19a9525b58659c15584b2cb97ef5f8 /d-backup
parentd449097301953bbd626433814cab5aa0680e3aca (diff)
Updates.
Diffstat (limited to 'd-backup')
-rwxr-xr-xd-backup6
1 files changed, 4 insertions, 2 deletions
diff --git a/d-backup b/d-backup
index a2efa4d..fd94d54 100755
--- a/d-backup
+++ b/d-backup
@@ -13,6 +13,8 @@ if [ ! $(whoami) = root ] ; then
fi
HOME=/home/anton
+REMOVE_ALL_BUT_N_FULL=4
+FULL_IF_OLDER_THAN=3M
source "$HOME/.duplicity.conf"
SOURCE=/
@@ -33,14 +35,14 @@ EOF
backup() {
nice ionice duplicity $DUPLICITY_OPTS \
--exclude-filelist "$HOME/.duplicity-exclude" \
- --full-if-older-than 2M \
+ --full-if-older-than "$FULL_IF_OLDER_THAN" \
"$SOURCE" "$TARGET"
cleanup
}
cleanup() {
duplicity $DUPLICITY_OPTS cleanup --force "$TARGET"
- duplicity $DUPLICITY_OPTS remove-all-but-n-full 3 --force "$TARGET"
+ duplicity $DUPLICITY_OPTS remove-all-but-n-full $REMOVE_ALL_BUT_N_FULL --force "$TARGET"
}
stats() {