Nextcloud – Update über CLI

Bei der Verwendung des Webinterfaces von Nextcloud für ein Update, kommt es öfters mal vor, dass es zu einem Timeout kommt und das Update abbricht. Aus diesem Grund ist es manchmal ratsam das Update über das Command-Line-Interface durchzuführen.

Das Update wird folgendermaßen gestartet (Beispiel auf eine Ubuntu System):
root@xxxxx:/var/www/vhosts/nextcloudhost/httpdocs# sudo -u www-data php /var/www/vhosts/nextcloudhost/httpdocs/updater/updater.phar

Nextcloud Updater – version: v18.0.9-8-g27dac77

Current version is 18.0.10.

Update to Nextcloud 18.0.11 available. (channel: “stable”)
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-18.0.11.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
You may use your browser or the occ upgrade command to do the upgrade

2020-11-26T06:11:59+00:00 Set log level to debug
……..
2020-11-26T06:12:06+00:00 Repair step: Reset generated avatar flag
2020-11-26T06:12:06+00:00 Starting code integrity check…
2020-11-26T06:12:10+00:00 Finished code integrity check
2020-11-26T06:12:10+00:00 Update successful
2020-11-26T06:12:10+00:00 Maintenance mode is kept active
2020-11-26T06:12:10+00:00 Reset log level

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

Maintenance mode is disabled

Zum Abschluss kann man nochmals die Version abfragen:

root@xxxxx:/var/www/vhosts/nextcloudhost/httpdocs# sudo -u www-data php ./occ -V
NGB Testcloud 18.0.11

Ausführliche Informationen zum Nextcloud Update findet man in der Online Dokumentation unter dem Link:

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/update.html