Merge pull request #533 from nextcloud/enh/529/data-fingerprint

update data fingerprint when restore was done
This commit is contained in:
Simon L 2022-04-26 21:57:46 +02:00 committed by GitHub
commit 09f9a24fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -233,6 +233,10 @@ if [ "$BORG_MODE" = restore ]; then
# Add file to Nextcloud container so that it skips any update the next time
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update"
# Add file to Nextcloud container so that it performs a fingerprint update the next time
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
fi
# Do the Backup check

View file

@ -250,6 +250,12 @@ if [ -z "$(find "/mnt/ncdata/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*"
exit 1
fi
# Perform fingerprint update if instance was restored
if [ -f "/mnt/ncdata/fingerprint.update" ]; then
php /var/www/html/occ maintenance:data-fingerprint
rm "/mnt/ncdata/fingerprint.update"
fi
# Apply one-click-instance settings
echo "Applying one-click-instance settings..."
php /var/www/html/occ config:system:set one-click-instance --value=true --type=bool