From b91ef3583c538e2153eb66458a64acba38839a7d Mon Sep 17 00:00:00 2001 From: snaki Date: Tue, 12 Jul 2022 13:21:07 +0200 Subject: [PATCH] minor changes --- btrbk | 6 +++--- btrbk.conf | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/btrbk b/btrbk index 11df0cf..ce73483 100755 --- a/btrbk +++ b/btrbk @@ -180,13 +180,13 @@ function testDate { if [ "$BKCYCLE" = "weekly" ]; then local dateType = "+%u" elif [ "$BKCYCLE" = "monthly" ]; then - local dateType = "+%d" + local dateType = "+%-d" else echo "BKCYCLE not correctly configured" exit 1 fi - for i in ${!BKRETENTION[@]}; do - if [ `date $dateType` = ${BKRETENTION[$i]} ]; then + for i in ${!BKDAY[@]}; do + if [ `date $dateType` = ${BKDAY[$i]} ]; then bkRun "full" fi done diff --git a/btrbk.conf b/btrbk.conf index 6e716c1..b205658 100644 --- a/btrbk.conf +++ b/btrbk.conf @@ -16,7 +16,7 @@ BTRFSUUID="d1b20b8a-3cf4-41f7-bdc8-d50d53dc77c2" #btrfs volume too keep snapshots in SNAPDIR="/.snapshots/" -#Rclone Directory on remote storage +#rclone Directory on remote storage RCLONEDIR="test:/mnt/bk/new/" #How many local snapshots should be kept @@ -26,10 +26,9 @@ KEEPLOCAL="10" BKCYCLE="monthly" #Day when to run full Backup -#can be specified multiple times 1-7 for weekely and 01-30 for monthly -#example ("01" "05" "23") -BKRETENTION=("01") - +#can be specified multiple times 1-7 for weekely and 1-30 for monthly +#example ("1" "5" "23") +BKDAY=("1") #Suffix name for incremental/full backups and retention #example: [YYYY-mm-"full"] and will keep the last two backups