This article is just note of updating Nextcloud from 21.0.x to 22.2.0.
Nextcloud has cool feature which we can update by command line.
This is what I did.
# Entering maintenance mode for safety sudo -u www-data php occ maintenance:mode --on # Execute update sudo -u www-data -php updater/updater.phar
More memory needed than configured.
[ ] Verify integrity ...PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 159323528 bytes) in phar:///var/www/html/updater/updater.phar/lib/Updater.php on line 637
I increased memory_limit temtatively.
vim /usr/local/etc/php/php.ini memory_limit = 512M
Retried but failed because result of step1-step4 remains somewhere.
sudo -u www-data -php updater/updater.phar (snip) Step 5 is currently in process. Please call this command later.
I deleted them by rm -rf.
# xxxxxxxxxxxx is random string for each environment rm -rf ../nextcloud_data/updater-xxxxxxxxxxxx/
Then it succeeded.
About 3 mins in my case.
time sudo -u www-data php updater/updater.phar Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4 Current version is 21.0.5. Update to Nextcloud 22.2.0 available. (channel: "stable") Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-22.2.0.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 # Input "y" and enter Info: Gracefully stopping the updater via Ctrl-C is not possible - PCNTL extension is not loaded. [✔] 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] # Just Enter (snip) Keep maintenance mode active? [y/N] # Just Enter to exit maintenance mode The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see https://www.php.net/manual/en/book.pcntl.php Maintenance mode disabled Maintenance mode is disabled real 3m20.641s user 0m33.321s sys 0m34.449s
Version is exactly updated.
Preview-Generator application is deactivated because this has not been tested yet.
Conclusion
How was it?
I would recommend to take backup before update!
Comments