News for hackers. Stuff that matters.
Re:Anything longer ago than yesterday should just say the ac... by bilekas on Saturday October 14, 2023 @02:19PM (#37882857)
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!

Re:Anything longer ago than yesterday should just say the ac... by kevincox on Saturday October 14, 2023 @04:49PM (#37884132)
Getting 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.

Re:Anything longer ago than yesterday should just say the ac... by bilekas on Saturday October 14, 2023 @05:04PM (#37884264)
> 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.