From ef55effa7f859c292a391f1a664780499829693d Mon Sep 17 00:00:00 2001 From: DecaTec Date: Sun, 10 Sep 2017 15:11:32 +0200 Subject: [PATCH 1/1] Changed restore sequence --- NextcloudRestore.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/NextcloudRestore.sh b/NextcloudRestore.sh index 0a40210..dc1af25 100644 --- a/NextcloudRestore.sh +++ b/NextcloudRestore.sh @@ -119,6 +119,13 @@ echo "Restoring backup DB..." mysql -h localhost -u "${dbUser}" -p"${dbPassword}" "${nextcloudDatabase}" < "${currentRestoreDir}/${fileNameBackupDb}" echo "Done" +# +# Start webserver +# +echo "Starting nginx..." +service nginx start +echo "Done" + # # Set directory permissions # @@ -128,12 +135,15 @@ chown -R "${webserverUser}" "${nextcloudDataDir}" echo "Done" # -# Start webserver +# Update the system data-fingerprint (see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html#maintenance-commands-label) # -echo "Starting nginx..." -service nginx start +echo "Updating the system data-fingerprint..." +cd "${nextcloudFileDir}" +sudo -u "${webserverUser}" php occ maintenance:data-fingerprint +cd ~ echo "Done" + # # Restore hardened directory permissions # @@ -160,14 +170,5 @@ sudo -u "${webserverUser}" php occ maintenance:mode --off cd ~ echo "Done" -# -# Update the system data-fingerprint (see https://docs.nextcloud.com/server/12/admin_manual/configuration_server/occ_command.html#maintenance-commands-label) -# -echo "Updating the system data-fingerprint..." -cd "${nextcloudFileDir}" -sudo -u "${webserverUser}" php occ maintenance:data-fingerprint -cd ~ -echo "Done" - echo "DONE!" echo "Backup ${restore} successfully restored." \ No newline at end of file -- 2.34.1