How to upgrade NextCloud

Fonte: ARDITI - WIKI
Saltar para a navegação Saltar para a pesquisa

Reference: https://docs.nextcloud.com/server/13/admin_manual/maintenance/upgrade.html

Enable maintenance mode and create a snapshot

# Login in ssh in Azevinho
ssh azevinho

cd /var/www/nextcloud

# enable maintenance mode
sudo -u www-data php occ maintenance:mode --on

# shutdown
shutdown -h now

When the system is down, on the VMWare host create a snapshot, and then start the VM

Do the upgrade of Nextcloud

# Login in ssh in Azevinho
ssh azevinho

# change file ownership in order to allow apache (www-data) to write.
chown -R www-data /var/www/nextcloud

# apply the manual upgrade as explained in
# https://docs.nextcloud.com/server/13/admin_manual/maintenance/update.html

cd /var/www/nextcloud/updater
sudo -u www-data php updater.phar

# Check if upgrade of Third Party Apps are available and install them

# fix the permissions by running this script:
fixNextCloudPermissions.sh

Disable maintenance mode

sudo -u www-data php occ maintenance:mode --off

Troubleshooting

At the end of the upgrade head to NextCloud Overview in the administration settings.

Here if you have a message saying:

Invalid UUIDs of LDAP users or groups have been found. Please review your "Override UUID detection" settings in the Expert part of the LDAP configuration and use "occ ldap:update-uuid" to update them.

Head to the terminal and type:

sudo -u www-data php /var/www/nextcloud/occ ldap:update-uuid --on

At this point, if you receive a message saying:

For N records, the UUID could not be saved to database. Double-check your configuration.

You need to go to MySQL, and drop the invalid rows from the oc_ldap_group_mapping table. This is achieved with the following command:

delete from oc_ldap_group_mapping where directory_uuid like "invalidated_%"

At this point everything should be back to normal