allow passing prefix to limit pruning ops

This commit is contained in:
Frederik Ring
2021-08-19 13:41:19 +02:00
parent 8c7ffc3d99
commit 0069faa7fd
2 changed files with 16 additions and 2 deletions

View File

@@ -105,6 +105,10 @@ echo "Will wait for next scheduled backup."
prune () {
target=$1
if [ ! -z "$BACKUP_PRUNING_PREFIX" ]; then
target="$target/${BACKUP_PRUNING_PREFIX}"
fi
rule_applies_to=$(
mc rm $MC_GLOBAL_OPTIONS --fake --recursive --force \
--older-than "${BACKUP_RETENTION_DAYS}d" \