Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occ db:add-missing-indices - Exact steps to resolve? #11167

Closed
opgailey opened this issue Sep 11, 2018 · 6 comments
Closed

occ db:add-missing-indices - Exact steps to resolve? #11167

opgailey opened this issue Sep 11, 2018 · 6 comments
Labels

Comments

@opgailey
Copy link

opgailey commented Sep 11, 2018

Hi all,

I've just updated by NC 13 server to NC 14 using the built in updater.

'Security & Set Up Warnings' is reporting: Missing index "fs_mtime" in table "oc_filecache"

It is telling me to run 'occ db:add-missing-indices' and according to the the NC 13 documentation the specific command is: sudo -u www-data php occ db:add-missing-indices
https://docs.nextcloud.com/server/13/admin_manual/configuration_server/occ_command.html#database-add-indices-label

When I run this command via CLI as ncadmin I get the following response: Could not open input file: occ

Any ideas? Am I running this command from the wrong place? Can someone detail the exact steps / commands required to resolve this Missing index "fs_mtime" in table "oc_filecache" issue?

I am a Linux beginner so apologies if the answer is obvious.

Many thanks.

@opgailey opgailey changed the title occ db:add-missing-indices - Exact steps? occ db:add-missing-indices - Exact steps to resolve? Sep 11, 2018
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #10926 (Possible DB indexes), #4625 (Missed sql index), #10656 (Configuration check - Minor typo: occ db:add-missing-indices), #10299 (Add filecache index on mtime), and #10158 (occ: user:list missing "numeric" username).

@ghost
Copy link

ghost commented Sep 11, 2018

Did you try running this command inside your nextcloud main install folder? (Where there's the files index.php, remote.php, the occ folder, ...) It worked there for me

@opgailey
Copy link
Author

@Jonast Oh dear. No I didn't. I was running it from the wrong location. :/

Apologies for that. I have run the command and it has worked perfectly.

Thanks for your help.

@FireEmerald
Copy link

FireEmerald commented Sep 30, 2018

Is it also possible to run the command from the web interface or execute a database query? Because if you do not have access to a CLI you can't run the command.

@nickvergessen
Copy link
Member

This should be discussed in #11491

@necesitod
Copy link

necesitod commented Jan 12, 2022

I can fix it
on the path nextcloud example /var/www/html/nextcloud

I made like root (Without ")

"sudo -u www-data php ./occ add-missing-indices"

on Debian GNU/Linux 11 (bullseye)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants