4 ms·
Interesting you say that actually, I have been working on a folder synch implementation across samba with mac & win environments and the last modified times are
by bilekas 3y ago
Interesting you say that actually, I have been working on a folder synch implementation across samba with mac & win environments and the last modified times are not a reliable source of truth it seems. This fuzzy method would have been very useful as the exact minute of the modified file isn't critical.
In the end though we just used checksums, but over the wire the larger files take too long. This comment has given me an idea!
- kevincox 3y agoGetting off topic but most sync systems do a quick comparison then a full one. So for example check modified, inode number against the previous version. If they are all a match consider skipping the checksum. This way you can skip almost all checksums on an incremental transfer. You can have false-negatives but this can often be mitigated by occasionally doing a full rescan or similar.
- bilekas 3y ago> So for example check modified, inode number against the previous version. To be honest, I didn't even try this because the destination machine is Windows, I didnt think inode number had an equivalent in windows, but after googling, there might be a way. Another great suggestion. As for the full checksum, I went with a chunk size of the first and the last of the file, (the changes are very small, property based) but I don't think its as reliable.