Skip to content

Commit

Permalink
borgbackup: improve testing backup upon instance restore
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L. <[email protected]>
  • Loading branch information
szaimen committed Nov 13, 2024
1 parent f7de6f6 commit aec499a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Containers/borgbackup/backupscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 archive."
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

0 comments on commit aec499a

Please sign in to comment.