Open wchang22 opened 5 years ago
only the differences are copied
you could use patches generated by diff-rs and applied using patch-rs
hashes files with the same modification time and size
you might be able to get something out of checksumdir
I use rsync locally for updating a whole-filesystem copy on an external ZFS drive (with certain excluded paths), before snapshotting it in ZFS. So for that kind of application, the aim would be to minimize the number of blocks written.
So a simple streaming byte-by-byte or block-by-block comparison between old and new versions would be fine for that. No need for diff or running-CRC. But if one day you want this to work remotely over the network, then you're going to need rsync-style running-CRC.
I use rsync locally for updating a whole-filesystem copy on an external ZFS drive (with certain excluded paths), before snapshotting it in ZFS. So for that kind of application, the aim would be to minimize the number of blocks written.
So a simple streaming byte-by-byte or block-by-block comparison between old and new versions would be fine for that. No need for diff or running-CRC. But if one day you want this to work remotely over the network, then you're going to need rsync-style running-CRC.
You need to keep both versions in cache for that, which slows you down significantly.
Implement file diffing such that: