changed month

This commit is contained in:
snaki 2022-05-31 12:04:34 +02:00
parent f000a65366
commit fe627df7d8

4
btrbk
View file

@ -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