Typically, updating minor versions of Nextcloud is a straightforward and smooth process. Today’s update wasn’t much different, but did require some admin intervention on my part. After the update, there was a note abouit missing indices, again. This seems to be fairly regular in NC updates, but doesn’t happen every time. A quick ssh session solved the issue:

# cd /var/www/nextcloud && sudo -u www-data php occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional path index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Adding properties_pathonly_index index to the oc_properties table, this can take some time...
oc_properties table updated successfully.
Check indices of the oc_jobs table.
Adding job_lastcheck_reserved index to the oc_jobs table, this can take some time...
oc_properties table updated successfully.
root@alaskalinuxuser-PowerEdge-R520:/var/www/nextcloud#

Nothing stellar here, it worked as advertised. What I keep wondering, though, is why this isn’t run by default as soon as the update completes? As in, part of the upgrade? While I started as root, you can see I switched to user www-data, so this isn’t a root permissions issue. PHP code runs often enough already in the NC instance, if I’m not mistaken, so why not tack this process onto the end of every upgrade?

Not sure I’ll ever know the answer, and it isn’t hard to do, so I guess I’ll just keep doing it by hand after each upgrade.

Linux – keep it simple.

Leave a Reply

Your email address will not be published.