delete incremental backups correctly after full backup

This commit is contained in:
snaki 2022-08-18 12:22:24 +02:00
parent 28dc169ab2
commit 89d53f5043
No known key found for this signature in database
GPG key ID: 27D0D26D9473A85C

1
btrbk
View file

@ -24,6 +24,7 @@ function bkRun {
btrfs send $SNAPDIR$snapName | gpg --batch -er "$PUBKEY" -o - | \ btrfs send $SNAPDIR$snapName | gpg --batch -er "$PUBKEY" -o - | \
rclone rcat $RCLONEDIR$month"-${FULL[0]}/"$snapName.pgp rclone rcat $RCLONEDIR$month"-${FULL[0]}/"$snapName.pgp
if [[ $1 = "full" ]]; then if [[ $1 = "full" ]]; then
rclone mkdir $RCLONEDIR$month"-${INCR[0]}"
for o in ${!bkSuffix[@]}; do for o in ${!bkSuffix[@]}; do
mapfile -t oldBk < <(rclone lsf $RCLONEDIR | grep ....-..-${bkSuffix[$o]} | head -n -${keepTime[$o]}) mapfile -t oldBk < <(rclone lsf $RCLONEDIR | grep ....-..-${bkSuffix[$o]} | head -n -${keepTime[$o]})
for n in ${!oldBk[@]}; do for n in ${!oldBk[@]}; do