Index missing in the DB

Hello everyone
I just install Nextcloud with Truecharts in my Truenas Scale server.
I see in the dashboard that I have missing index “fs_storage_path_prefix” for table “filecache”.

I try to execute the command “occ db:add-missing-indices” but does not work, I guess i need to be in the right folder.
In this topic : Some indices are missing in the database! How to add them manually - #2 by castillo92
I see the file “cd /var/www/nextcloud”
But it does not exist. I have var/www/ but only a file html/ and no nextcloud

Is someone using truenas scale can help me ?
Thank you !

System info :
Nextcloud version : 28.0.1
Operating system and version : TrueNAS-SCALE-23.10.1

./occ whatever

As long as you’re in /var/www/html

Or see the official docs for occ in TrueCharts[1] for a more thorough guide.

[1] Nextcloud Migration Guide | TrueCharts

In the latest Nextcloud versions occ is not an executable anymore.

sudo php /path/to/nextcloud/occ db:add-missing-indices
Depending on your installation Nextcloud has been installed in a docker container or a different folder f.e. /var/www/html

If you get a result after “sudo docker ps” with “Nextcloud” in the output lines, Nextcloud is in a docker container.

If in a docker container, use
sudo docker exec -u www-data php /var/www/html/occ db:add-missing-indices
(the path may be different)

Which Nextcloud versions would that be? Some of the third-party Docker images maybe?

xxx@node2:~/src/infrastructure/test/test-nc28$ docker compose exec -u33 app /var/www/html/occ status
  - installed: true
  - version: 28.0.1.1
  - versionstring: 28.0.1
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false
xxx@node2:~/src/infrastructure/test/test-nc28$ docker compose exec -u33 app ./occ status
  - installed: true
  - version: 28.0.1.1
  - versionstring: 28.0.1
  - edition: 
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false
xxx@node2:~/src/infrastructure/test/test-nc28$ 

Starting with Nextcloud 25, if I am right.

But more imporant:
As result of posting your instruction occ is in folder

/var/www/html/occ

(see docker compose instruction)

So the command
docker exec -u www-data php /var/www/html/occ db:add-missing-indices
should work

the command docker does not exist.
Also /var/www/html/occ doens not exist
Screenshot 2024-01-18 083036

should i mount the pvc and try to execute the occ in it ?

Thank you for your replies

Did you look on the linked Truecharts-page, as jtr posted it in posting #2?

Because I do not know the Nextcloud package for NAS, I cannot help you more.

Ho yes i see. I should use the shell in the pod.
It works thx.
I thought this would speed up nextcloud but this is not the case. I will investigate more (but this is an other problem for this topic).
I think about my speed connection.

Thx a lot !

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.