File scan command in Truenas installation

I’m using the Nextcloud plugin for Truenas and I have several users syncing to one project folder. However, there seems to be a problem where files don’t start syncing immediately. After some searching, it seems that I can use the OCC file scan command to refresh the files and solve this issue. Problem is, I’m not sure how to accomplish this with the Truenas Nextcloud plugin.

Could anyone more familiar with CLI give me some pointers? Would I do it from the Truenas shell, or the specific Nextcloud jail shell?

I also had someone suggest that a file watcher such as Watchman might be more efficient than scanning the whole system for new files, is this a possibility?

I think perhaps you’ve misidentified the issue. The occ files:scan command is for when files have been manually changed outside of Nextcloud’s knowledge, so it can reconcile the database with what’s actually on disk. Has nothing to do with file sync to clients.

How much of a delay are we talking about?

If the TrueNAS Nextcloud version doesn’t support the high performance files backend (I don’t use it so not sure) then it has to rely on the client polling for changes.

If you force a sync on the client, then does it sync the changes right away?