Changed restore sequence
This commit is contained in:
@@ -119,6 +119,13 @@ echo "Restoring backup DB..."
|
|||||||
mysql -h localhost -u "${dbUser}" -p"${dbPassword}" "${nextcloudDatabase}" < "${currentRestoreDir}/${fileNameBackupDb}"
|
mysql -h localhost -u "${dbUser}" -p"${dbPassword}" "${nextcloudDatabase}" < "${currentRestoreDir}/${fileNameBackupDb}"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Start webserver
|
||||||
|
#
|
||||||
|
echo "Starting nginx..."
|
||||||
|
service nginx start
|
||||||
|
echo "Done"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set directory permissions
|
# Set directory permissions
|
||||||
#
|
#
|
||||||
@@ -128,12 +135,15 @@ chown -R "${webserverUser}" "${nextcloudDataDir}"
|
|||||||
echo "Done"
|
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..."
|
echo "Updating the system data-fingerprint..."
|
||||||
service nginx start
|
cd "${nextcloudFileDir}"
|
||||||
|
sudo -u "${webserverUser}" php occ maintenance:data-fingerprint
|
||||||
|
cd ~
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Restore hardened directory permissions
|
# Restore hardened directory permissions
|
||||||
#
|
#
|
||||||
@@ -160,14 +170,5 @@ sudo -u "${webserverUser}" php occ maintenance:mode --off
|
|||||||
cd ~
|
cd ~
|
||||||
echo "Done"
|
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 "DONE!"
|
||||||
echo "Backup ${restore} successfully restored."
|
echo "Backup ${restore} successfully restored."
|
||||||
Reference in New Issue
Block a user