I need to test the incremental backup of a file using
rsync i.e. whether
rsync transfers entire file or just the changes made to it, when an incremental backup is fired.
Just for a test, I've created a file with details as follows:
-rw-r--r-- 1 root root 6.6M Mar 10 11:11 tmp
I transferred this file to some directory using rsync as follows:
rsync -avr --stats --human-readable tmp remotehost:/tmp/
I just incremented the file size, by appending the output of
seq command to the
-rw-r--r-- 1 root root 14M Mar 10 11:15 tmp
And then executed the
rsync command again, expecting that it would transfer only incremental part of the file. But, It shows that, entire file was transferred:
Number of files: 1 Number of files transferred: 1 Total file size: 13.78M bytes Total transferred file size: 13.78M bytes Literal data: 13.78M bytes Matched data: 0 bytes File list size: 20 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 13.78M Total bytes received: 31 sent 13.78M bytes received 31 bytes 27.56M bytes/sec total size is 13.78M speedup is 1.00
How can I cross check whether entire file has been transferred or just the incremental part? I tried with
iftop, but I am unable to conclude anything. Is there any method using which we can monitor data transfer between two hosts?