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