0

I need to use the minimum amount of bandwidth when patching files from a server. How can I configure rsync to achieve this?

I've tried the following for 10Mb file filled with random text, then made just a few bytes of changes

rsync -azv --no-whole-file

But it still uses quite a bit of bandwith compared to the few bytes I added to the file

sent 16,347 bytes received 19,505 bytes

1 Answers1

1

But it still uses quite a bit of bandwith compared to the few bytes I added to the file

It has reduced the transfer nearly 1000 fold over the raw file size.

rsync doesn't know which bytes you changed. It needs to find the changes - it does this by hashing regions of the file at both ends and sending the hashes across the network to compare them. Going down to individual bytes would be very inefficient in the vast majority of cases.

guntbert
  • 631
  • 9
  • 21
symcbean
  • 21,009
  • 1
  • 31
  • 52
  • 35 000 bytes was sent back and forth to update the 5 bytes I added to the file, so its more like 285 fold. Still much better than sending the entire file of course! I was just wondering if there was a way to optimize this further. Thanks for your input! – Q-bertsuit Oct 03 '22 at 20:03