borg - substitute prefix with glob-archives

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-01-12 23:56:41 +01:00
parent b5f9c860b5
commit 8b86294936

View file

@ -151,7 +151,7 @@ if [ "$BORG_MODE" = backup ]; then
# Prune archives # Prune archives
echo "Pruning the archives..." echo "Pruning the archives..."
if ! borg prune --prefix '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then if ! borg prune --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
echo "Failed to prune archives!" echo "Failed to prune archives!"
exit 1 exit 1
fi fi
@ -182,7 +182,7 @@ if [ "$BORG_MODE" = backup ]; then
exit 1 exit 1
fi fi
echo "Pruning additional volumes..." echo "Pruning additional volumes..."
if ! borg prune --prefix '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then if ! borg prune --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
echo "Failed to prune additional docker-volumes archives!" echo "Failed to prune additional docker-volumes archives!"
exit 1 exit 1
fi fi
@ -212,7 +212,7 @@ if [ "$BORG_MODE" = backup ]; then
exit 1 exit 1
fi fi
echo "Pruning additional host mounts..." echo "Pruning additional host mounts..."
if ! borg prune --prefix '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then if ! borg prune --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
echo "Failed to prune additional host-mount archives!" echo "Failed to prune additional host-mount archives!"
exit 1 exit 1
fi fi