From e2917305c959106ab01018b4c768505fb2f655ac Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Tue, 5 Mar 2024 22:18:49 +0500 Subject: Updates --- d-backup | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'd-backup') 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 ;; -- cgit v1.2.3