Merge pull request #4021 from nextcloud/enh/4006/datadir-check

borgbackup - add check for .ocdata file for datadir
This commit is contained in:
Simon L 2024-01-10 11:59:50 +01:00 committed by GitHub
commit 6b47d8dce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,6 +69,11 @@ if [ "$BORG_MODE" = backup ]; then
exit 1
elif ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/database-dump.sql" ]; then
echo "database-dump is missing. Cannot perform backup!"
echo "Please check the database container logs!"
exit 1
elif ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ocdata" ]; then
echo "The .ocdata file is missing in Nextcloud datadir which means it is invalid!"
echo "Is the drive where the datadir is located on still mounted?"
exit 1
fi