From 5bdfa2466dd8640e19a742d8c51f15441220e3be Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 13 Nov 2024 18:53:38 +0100 Subject: [PATCH] borgbackup: improve testing backup upon instance restore Signed-off-by: Simon L. --- Containers/borgbackup/backupscript.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 7dfe8431..dda0504c 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -572,12 +572,18 @@ if [ "$BORG_MODE" = test ]; then fi fi - if ! borg list; then + if ! borg list >/dev/null; then echo "The entered path seems to be valid but could not open the backup archive." echo "Most likely the entered password was wrong so please adjust it accordingly!" exit 1 else - echo "Everything looks fine so feel free to continue!" - exit 0 + if ! borg list | grep "nextcloud-aio"; then + echo "The backup archive does not contain a valid Nextcloud AIO backup." + echo "Most likely was the archive not created via Nextcloud AIO." + exit 1 + else + echo "Everything looks fine so feel free to continue!" + exit 0 + fi fi fi