Docker: Lots of warnings after upgrading from 17 to 18

Created on 20 Jan 2020  路  3Comments  路  Source: nextcloud/docker

Looks like the upgrade process did not run some DB migration script:

There are some warnings regarding your setup.

    The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
        Missing index "calendarobject_calid_index" in table "oc_calendarobjects_props".
        Missing index "schedulobj_principuri_index" in table "oc_schedulingobjects".
    Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.
        mounts.storage_id
        mounts.root_id
        mounts.mount_id

Most helpful comment

I'm just a simple user of the project and found this issue and in my opinion this works as expected.
Also you can find the information in the documentation

Some operation can be quite time consuming. Therefore we decided not to add them to the normal upgrade process. We recommend to run them manually after the upgrade was completed. Below you find a list of this commands.

So just run the commands in your messages which will fix these warnings

occ db:add-missing-indices
occ db:convert-filecache-bigint

If you are using docker-compose for your setup you can run these commands with

docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:add-missing-indices
docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:convert-filecache-bigint

All 3 comments

I'm just a simple user of the project and found this issue and in my opinion this works as expected.
Also you can find the information in the documentation

Some operation can be quite time consuming. Therefore we decided not to add them to the normal upgrade process. We recommend to run them manually after the upgrade was completed. Below you find a list of this commands.

So just run the commands in your messages which will fix these warnings

occ db:add-missing-indices
occ db:convert-filecache-bigint

If you are using docker-compose for your setup you can run these commands with

docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:add-missing-indices
docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:convert-filecache-bigint

Well, then that's a problem with the nextcloud-docker documentation:

https://github.com/nextcloud/docker/blob/master/README.md#update-to-a-newer-version

When using docker-compose your compose file takes care of your configuration, so you just have to run:

$ docker-compose pull
$ docker-compose up -d

Maybe a link to the main Nextcloud documentation would make it more obvious. I assumed that since the documentation doesn't mention it, it's taken care of under the hood.

I'm just a simple user of the project and found this issue and in my opinion this works as expected.
Also you can find the information in the documentation

Some operation can be quite time consuming. Therefore we decided not to add them to the normal upgrade process. We recommend to run them manually after the upgrade was completed. Below you find a list of this commands.

So just run the commands in your messages which will fix these warnings

occ db:add-missing-indices
occ db:convert-filecache-bigint

If you are using docker-compose for your setup you can run these commands with

docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:add-missing-indices
docker-compose exec --user www-data <name-of-your-nextcloud-container> php occ db:convert-filecache-bigint

This should be somewhat included right in the Overview/Security Scan results page. Spent 10+ minutes to figure out how to run those commands in Podman.

Was this page helpful?
0 / 5 - 0 ratings