Scan personal files only, not external storage

Hello,

Sorry for what is probably a daft question but I can’t work out how to use occ to only scan personal files and not external storage. Can anyone help?

I’ve realised that, if user1, user2 … and userN all have access to folder1 from external storage, when I run occ files:scan, folder1 is scanned N times, which slows it down when user files < 1GB and folder1 files > 8TB.

Does anyone know of a more efficient approach?

Thanks in advance.

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

I know this is an old topic but I have the same issue. I’m sharing a lot of data with external storage to many users and if I scan files for a user it scans all of the external storage too.

Is this by design? It would seem that external storage should be scanned separately.

if I am not mistaken so anyone correct if I am wrong but you can use the PATH option to point to the data location of the user.

occ files:scan --path=/nc-data/USERNAME

this should exclude external storage as there mounted else where.

occ files:scan --help

The shared folder is for every user an own logical directory tree with its own registration in the database. files:scan does exactly that, creating the individual paths of the different users in the database, so that for different users they are displayed correctly. Inside of the database there is an extra layer for that. That is the reason, why it is scanned every time again.

If you did read the help, what you should definitively do for anny command you run in terminal, you should have found the --home-only option, wich “only scan the home storage, ignoring any mounted external storage or share”. Then you could additionally use the --unscanned option, to “only scan files which are marked as not fully scanned”

But why do the files have to be scanned at all? They are maintained by the server all by itself. If changes are made from outside, you can scan each individual file (the help also tells you how to do that), which takes less than a fraction of a second and is even more efficient.