From fe627df7d8d0d078a51bc77d26bd84a59262c2b8 Mon Sep 17 00:00:00 2001 From: snaki Date: Tue, 31 May 2022 12:04:34 +0200 Subject: [PATCH] changed month --- btrbk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btrbk b/btrbk index 71c281e..9d11a5c 100755 --- a/btrbk +++ b/btrbk @@ -25,8 +25,8 @@ function bkRun { btrfs send $SNAPDIR$snapName | gpg --batch -er $PUBKEY -o - | rclone rcat $RCLONEDIR$month"-full/"$snapName.pgp if [[ $1 = "monthly" ]] && rclone ls $RCLONEDIR$(date -d "$date -1 month" +%Y-%B)-incr; then rclone delete $RCLONEDIR$(date -d "$date -1 month" +%Y-%B)-incr/ - if rclone ls $RCLONEDIR$(date -d "$date -6 month" +%Y-%B)-full/; then - rclone delete $RCLONEDIR$(date -d "$date -6 month" +%Y-%B)-full/ + if rclone ls $RCLONEDIR$(date -d "$date -2 month" +%Y-%B)-full/; then + rclone delete $RCLONEDIR$(date -d "$date -2 month" +%Y-%B)-full/ fi fi fi