Nextcloud: Using occ in a FreeNAS jail

So, as I upgraded to newer versions of Nextcloud, I began to see some setup warnings requiring me to run occ.

No problem I thought. I’ll just do this in a terminal session. However, there’s a little bit more to running occ under FreeNAS. The syntax is a little different. Also, its really important to set Nextcloud in maintenance mode first before running the commands as you don’t your users to be doing something while occ runs.

root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ maintenance:mo de --on'
Maintenance mode enabled
root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ db:add-missing -primary-keys'
Nextcloud is in maintenance mode - no apps have been loaded


Check primary keys.
Adding primary key to the federated_reshares table, this can take some time…
federated_reshares table updated successfully.
Adding primary key to the systemtag_object_mapping table, this can take some tim e…
systemtag_object_mapping table updated successfully.
Adding primary key to the comments_read_markers table, this can take some time.. .
comments_read_markers table updated successfully.
Adding primary key to the collres_resources table, this can take some time…
collres_resources table updated successfully.
Adding primary key to the collres_accesscache table, this can take some time…
collres_accesscache table updated successfully.
Adding primary key to the filecache_extended table, this can take some time…
filecache_extended table updated successfully.
root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ db:convert-filecache-bigint'
Nextcloud is in maintenance mode - no apps have been loaded


Following columns will be updated:

* federated_reshares.share_id
* files_trash.auto_id
* share_external.id
* share_external.paren

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n] y
root@nextcloud:~ # su -m www -c 'php /usr/local/www/nextcloud/occ maintenance:mode --off'
Maintenance mode disabled

Keep Reading

PreviousNext

Comments

Leave a Reply