Automate OCC Filescan

By the way files:scan --all will rescan whole file system together with externals… https://docs.nextcloud.com/server/13/admin_manual/configuration_server/occ_command.html#file-operations
I used this script to rescan external shares only. Script will fetch data about all external storages of all users and perform scan of them. I put it in cron like twice per day and it consumes much less resources in compare to “rescan all” command

1 Like