<div dir="ltr">Hi all,<br><br>I do some testings on rsync by using the following method:<br><br>1- rsyning the following file with rsync:<br><br>rsync rsync://<a href="http://ftp.cn.debian.org/debian/dists/Debian7.8/main/binary-all/">ftp.cn.debian.org/debian/dists/Debian7.8/main/binary-all/</a><br>Packages.bz2 .<br><br>2- Then I split the file into little files with the file size equaling to <br>128K, which is the maximum of the block-size accepted by rsync. <br><br>split -b 128K Packages.bz2<br><br>And at this point, I obtained the following 20 files:<br><br>werner@debian:~/http_resume_test$ ls x*<br>xaa  xac  xae  xag  xai  xak  xam  xao  xaq  xas<br>xab  xad  xaf  xah  xaj  xal  xan  xap  xar  xat<br><br>Then I delete some files, say, xab and xae, from the above little <br>files, and then use the cat tool to regenerate the Packages.bz2 by only <br>using the remaining little files:<br><br>werner@debian:~/http_resume_test$ for i in `ls x*`; do cat $i >> <br>Packages.bz2; done<br><br>3- Then, I re-run rsync with the following commands to syncing on the <br>above re-generated Packages.bz2 file for testing:<br><br>$ rsync -v -B131072 --append rsync://<a href="http://ftp.cn.debian.org/debian/dists/">ftp.cn.debian.org/debian/dists/</a><br>Debian7.8/main/binary-all/Packages.bz2  .<br><br>[snip]<br>Packages.bz2<br><br>sent 47 bytes  received 577,028 bytes  230,830.00 bytes/sec<br>total size is 2,541,616  speedup is 4.40<br><br>$ rsync -v -B131072 --append-verify rsync://<a href="http://ftp.cn.debian.org/debian/">ftp.cn.debian.org/debian/</a><br>dists/Debian7.8/main/binary-all/Packages.bz2  .<br><br>[snip]<br><br>sent 28 bytes  received 1,381 bytes  563.60 bytes/sec<br>total size is 2,541,616  speedup is 1,803.84<br><br>4- Finally, I use diff to see the differences between the original <br>Packages.bz2 file the the one generated by the above two rsyncing runnings <br>with --append and --append-verify options.<br><br>Note, in the following command, the ~/Packages.bz2 is the original <br>Packages.bz2 file directly obtained from <a href="http://ftp.cn.debian.org/debian/">http://ftp.cn.debian.org/debian/</a><br>dists/Debian7.8/main/binary-all/Packages.bz2. <br><br>werner@debian:~/http_resume_test$ diff Packages.bz2 ~/Packages.bz2 <br>Binary files Packages.bz2 and /home/werner/Packages.bz2 differ<br><br><br>As you can see, the finally file obtained by --append then --append-<br>verify is a wrong file which is differ from the original one.<br><br>5- In the above test, if I only running the following command to re-<br>rsyncing on the re-gererated Packages.bz2: <br><br>$ rsync -v -B131072 --append-verify rsync://<a href="http://ftp.cn.debian.org/debian/">ftp.cn.debian.org/debian/</a><br>dists/Debian7.8/main/binary-all/Packages.bz2  .<br><br>The result file will be correct, see following for detail:<br><br>werner@debian:~/http_resume_test$ diff Packages.bz2 ~/Packages.bz2 <br>werner@debian:~/http_resume_test$ <br><br><br>Any hints on this issue?<br><br>Regards<br><br clear="all"><br>-- <br><div class="gmail_signature">Hongyi Zhao <<a href="mailto:hongyi.zhao@gmail.com">hongyi.zhao@gmail.com</a>> <br>Xinjiang Technical Institute of Physics and Chemistry<br>Chinese Academy of Sciences <br>GnuPG DSA: 0xD108493</div>
</div>