How to emulate rdiff behaviour

Daniel.Li daniel_li at usish.com
Sun May 31 23:10:57 GMT 2009


On Sun, 2009-05-31 at 14:34 -0400, Matt McCutchen wrote:
> > And one more thing here:
> > If you are going to prepare this batch file, it seems there will be
> double the workload of network, see below statements? Is that right?
> > 
> > > rsync -av --only-write-batch=/batches/$DATE
> bhost:/backup2/ /backup/
> > > rsync -av /backup/ bhost:/backup2/
> 
> Not if you put /backup and /backup2 on the same machine by dropping
> the
> "bhost:" from those commands, as Wayne mentioned.  He included it just
> to point out the possibility of having those dirs on different
> machines.
> 

Humm... I have a NAS storage device, which is bhost, and I found that
rsync will NOT simple transfer exactly the diff size of the contents,
see below my explanation.

I have done a simple test:
1) backup a file;
2) remove 256 bytes in this file;
3) backup again, this algorithm will transfer 1144 bytes of diff data,
which is about 4 times the size of original removed data block.

We are very much concerned on workload of network. As we have only 256
diff bytes, If we use batch files with bhost, then we might be need to
transfer about 8 times the size of original removed data block.

Well, I think I don't have much detailed knowledge on rsync diff
algorithm. So I raised this question here. Maybe the transfer size will
be different depending on the offset and size of removed data block.

Can anyone here help to explain it? Or is there any info that I have
missed or any report/document/evaluation? Please help to point me to
these URLs. Thanks.

-- 
Daniel Li




More information about the rsync mailing list