Nextcloud Versionsupgrade von NC27 auf NC28 via Kommandozeile

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

Der Vorteil eines Upgrades bei Nextcloud via CLI (Kommandozeile) ist, das es keine Zeitbeschränkung in einzelnen Prozessschritten, gibt wie bei den Updates und Upgrade über die Weboberfläche der Fall ist. Dort ist je nach PHP-Konfiguration ein Prozess in der Ausführung auf max. 60 Sek. beschränkt, dauert er länger bricht der Prozess mittendrin ab. Bei Kleinen- oder Einzelinstanzen ist das nicht so oft der Fall, aber bei Mehrbenutzerinstanzen, kann das Upgrade schon mal einige Minuten dauern. Da ist es wirklich ratsam das Versionsupdate egal ob Minor- (V27.1 auf V27.2)oder MajorUpgrade (V27.2 auf 28.0) via CLI zu machen. Man ruft die Datei updater.phar auf.

bob@linux: sudo -u www-data php /var/www/nextcloud/updater/updater.phar
Nextcloud Updater – version: v27.1.0rc3-15-gfa7af53

Current version is 27.1.5.

Update to Nextcloud 28.0.1 available. (channel: „stable“)
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-28.0.1.zip
Open changelog ↗

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the „occ upgrade“ command be executed? [Y/n] Y
Nextcloud or one of the apps require upgrade – only a limited number of commands are available
[…]
Fix broken values of calendar objects

Starting …
0/0 [>—————————] 0%
Repair step: Registering building of calendar search index as background job
[…]
Clean up old calendar subscriptions from deleted users that were not cleaned-up

Starting …
0/0 [->————————–] 0%
Repair info: 0 calendar subscriptions without an user have been cleaned up
[…]
Resetting log level

Keep maintenance mode active? [y/N] N
Maintenance mode disabled

Maintenance mode is disabled
bob@linux:


Verfügbare Updates für Nextcloud-Apps lassen sich mit auch via CLI einspielen.
bob@linux: sudo -u www-data /var/www/nextcloud/occ app:update --all

Autor: tunda

Macht was mit Technik & Kultur.