From 8e00812e0db010270a502bde2dc85e885fbaeda9 Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 26 Apr 2022 15:44:13 +0200 Subject: [PATCH] update data fingerprint when restore was done Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 4 ++++ Containers/nextcloud/entrypoint.sh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 491fb6a8..6aabc9cc 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -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 diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index ab7dd083..ffe6d687 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -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