summaryrefslogtreecommitdiff
path: root/d-backup
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2024-03-05 22:18:49 +0500
committerAnton Bobov <anton@bobov.name>2024-03-05 22:25:05 +0500
commite2917305c959106ab01018b4c768505fb2f655ac (patch)
tree55079dff911c81a5f9dbb84f3e584353a74c28ad /d-backup
parentc1c648cabb419a0f281e32685287ca1e07e9271f (diff)
Updates
Diffstat (limited to 'd-backup')
-rwxr-xr-xd-backup9
1 files changed, 9 insertions, 0 deletions
diff --git a/d-backup b/d-backup
index a6900e5..5cd0ef1 100755
--- a/d-backup
+++ b/d-backup
@@ -14,6 +14,7 @@ fi
HOME=/home/anton
REMOVE_ALL_BUT_N_FULL=4
+REMOVE_OLDER_THAN=1Y
FULL_IF_OLDER_THAN=3M
source "$HOME/.duplicity.conf"
@@ -48,6 +49,11 @@ cleanup() {
_duplicity remove-all-but-n-full $REMOVE_ALL_BUT_N_FULL --force "$TARGET"
}
+cleanup-old() {
+ _duplicity cleanup --force "$TARGET"
+ _duplicity remove-older-than $REMOVE_OLDER_THAN --force "$TARGET"
+}
+
stats() {
_duplicity collection-status "$TARGET"
}
@@ -73,6 +79,9 @@ while (("$#")); do
cleanup)
cleanup
;;
+ cleanup-old)
+ cleanup-old
+ ;;
stats)
stats
;;