61.22 Nextcloud Maintenance Mode


When performing maintenance operations on the Nextcloud server the application should be set into maintenance mode. Connect to the nextcloud server:

ssh nextcloud.myserver.net

Then go into maintenance mode:

sudo nextcloud.occ maintenance:mode --on
Maintenance mode enabled

Perform whatever operations are required. In this example the Security and setup warnings page on the browser under Settings, Administration, Overview for this Nextcloud instance recommended the following action:

sudo nextcloud.occ db:convert-filecache-bigint
Nextcloud is in maintenance mode - no apps have been loaded

Following columns will be updated:

* mounts.storage_id
* mounts.root_id
* mounts.mount_id

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] y

This was almost instantaneous for my testing.

Then come out of maintenance mode:

sudo nextcloud.occ maintenance:mode --off 
Maintenance mode disabled

Alternatively, edit /var/www/nextcloud/config/config.php to set:

  'maintenance' -> true,

Perform the maintenance and then edit it again:

  'maintenance' -> false,

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0