Nextcloud Update

Hello everyone. I have recently updated Nextcloud via UCS update, when it reached 20.0.4.0 (the latest at the time of this writing) Nextcloud went into maintenance mode. After removing maintenance mode, it’s prompting me to update as shown here.

The log file and UCS panel show 20.0.4.0 installed but the app appears to not be aware since it’s stating that an update is needed.

I know I’m not supposed to update outside the UCS panel, but I have tried to update using the shell command: univention-app shell nextcloud sudo -u www-data /var/www/html/occ upgrade

The result is: Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed Maintenance mode is kept active

Any help is appreciated.

There is another thread here that discusses updating some apps and fixing some other setup issues in NextCloud before running the app update in UCS. I’m not sure what state your install is in, but if you can get logged in and check the overview page of the Admin account it might give you some suggestions on what needs to be done. Also check the apps page to make sure the apps are up to date as well.

If something is wrong and preventing the upgrade you might be able to manually remove or disable that app and then run the upgrade.

1 Like

Found the thread I was thinking of.

1 Like

Thanks for the reply, I noticed that the config.php showed an older version 21.x instead of 24.0.4-0 so it appears to be a discrepancy between what is installed as per UCS and what is installed according to Nextcloud.

I am going to revert from backup and upgrade to the latest version before 24.0.4-0 what when the whole thing went belly up. Also I had not rebooted between updates, there were 4 or 5 updates before reaching 24.0.4-0, this time I’m going to reboot between each one just in case.

I did read about drawio having to be removed but that’s an important app for us, so i will have to research further. I will stay at 23.x for now.

Thanks again Kevo.

Für alle UCS-Nextcloud-Nutzer, die nach Update das Problem “Wartungsmodus” haben und ein Upgrade mit der Meldung abgelehnt wird:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active

Hier lief das Update via App-Center von 22 auf 23 problemlos, von 23 auf 24 schien auch alles glatt zu gehen, es gab keine Fehlermeldung, doch die Instanz blieb im Wartungsmodus hängen - Kontrolle:

#docker image list

REPOSITORY                               TAG       IMAGE ID      CREATED     SIZE
docker.software-univention.de/nextcloud  24.0.4-0  206d9bb78309  7 days ago  1.18GB

#univention-app list |grep -A1 -i next

nextcloud
  Name: Nextcloud Hub
  Latest version: 24.0.4-0

Soweit also alles ok, dann viel gelesen, hin und her überlegt, Neuaufsetzung etc. pp.

Wg. Passwort für ein pg-sql-Backup mal in die config.php reingeschaut - und da stand doch tatsächlich noch der alte Wert ‘version’ => ‘23.0.6.0’ drin - warum auch immer …

Auf den aktuellen Wert geändert und den bekannten Befehl abgesetzt:

#univention-app shell nextcloud sudo -u www-data /var/www/html/occ upgrade

Und siehe da, das Skript lief anstandslos durch - lediglich 2 Apps wurden deaktiviert:

Disabled incompatible app: calendar
Disabled incompatible app: user_saml

Den Wartungsmodus ausschalten mittels

#univention-app shell nextcloud sudo -u www-data /var/www/html/occ maintenance:mode --off

und voila: Im Browser öffnet sich wieder das Anmeldefenster!

Vllt. hilfts ja jemandem!

Sometimes it might help, first to update the Netcloud-apps inside Netcloud before upgrading Netcloud.

Additionally ater every upgrade I execute a few occ commands to adapt the database to the requirements:

univention-app shell nextcloud sudo -u www-data php /var/www/html/occ maintenance:mode --on
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ db:convert-filecache-bigint --no-interaction
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ db:add-missing-columns
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ db:add-missing-indices
univention-app shell nextcloud sudo -u www-data php /var/www/html/occ maintenance:mode --off
Mastodon