Occ files:scan does not find all files

Nextcloud version (eg, 12.0.2): 13.0.2
Operating system and version (eg, Ubuntu 17.04): Debian Jessie
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.10
PHP version (eg, 7.1): 7.0

The issue you are facing:
I have just migrated a large amount of files to Nextcloud from a Samba fileserver via rsync and then ran the occ files:scan command on the target directory. However, the number of files that the scan reports is a bit lower than the actual number of files on the filesystem, 126 are missing. occ does not return any errors or warnings.

My gut feeling is that there is nothing important missing and that it’s mostly system files etc. that Nextcloud automatically stripped out. But I want to make sure that nothing important is lost, and I have not found any documentation on what kinds of files occ doesn’t index.

Does anyone know if certain filetypes are just not indexed? Is there an easy way to get a machine-readable output of the file index so I could manually diff it to see what’s missing?

| Folders | Files  | Elapsed time |
| 27978   | 142693 | 00:05:50     |

root@nc:/var/www/nextcloud/data/[redacted]/files/[redacted]/Books# find . -type f | wc -l   

Thank you!