Hongyi Zhao
2015-Apr-14 09:24 UTC
Two same rsync commands give different results on two debian mirrors.
On Tue, 14 Apr 2015 09:32:10 +0200, Paul Slootman wrote:> On Tue 14 Apr 2015, Hongyi Zhao wrote: >> >> See the following commands: >> >> ___________________________ >> >> $ rsync -rmnv -f +_README -f -_* ftp.is.co.za::mirror/ftp.debian.org/ >> ftp.us.debian.org/debianPlease see the above line including the part of line-wrapping. I've used the correct rsync tree just as you have noted in the following.>> >> [snipped] >> >> receiving file list ... done >> >> sent 23 bytes received 9 bytes 1.42 bytes/sec total size is 0 >> speedup is 0.00 (DRY RUN) >> >> $ rsync -rmnv -f +_README -f -_* ftp.cn.debian.org::debian >> >> [snipped] >> >> receiving file list ... done drwxr-xr-x 4,096 2015/04/14 >> 11:34:19 . >> -rw-rw-r-- 1,370 2015/01/10 18:21:28 README >> >> sent 47 bytes received 1,389 bytes 574.40 bytes/sec total size is >> 1,370 speedup is 0.95 (DRY RUN) >> _________________________ >> >> Why the same rsync commands give different results on the above two >> debian mirrors? The first one failed to find anything even the README >> exists, while the second one succeed for the job. > > The contents of those locations is entirely different, which becomes > obvious if you simply run: > > $ rsync ftp.is.co.za::mirror/ftp.debian.org/ > $ rsync ftp.cn.debian.org::debian > > If you want the same tree, use > ftp.is.co.za::mirror/ftp.debian.org/ftp.us.debian.org/debian/ for the > first location.No, I've tried this tree in my above post. Why do you said I have used a wrong rsync direcory tree. See my above notes for detail. In fact, the issue I meet is as follows, see the following for detail: 1- If I append the `/' in the end of the tree, I'll succeed: werner at debian:~$ rsync -rmnv -f +_README -f -_* ftp.is.co.za::mirror/ ftp.debian.org/ftp.us.debian.org/debian/ [snipped] receiving file list ... done drwxr-xr-x 4,096 2015/04/13 11:18:19 . -rw-rw-r-- 1,370 2015/01/10 18:21:28 README sent 130 bytes received 886 bytes 96.76 bytes/sec total size is 1,370 speedup is 1.35 (DRY RUN) 2- If I don't use the `/' in the end of the tree, the rsync will fail to retrieve anything: werner at debian:~$ rsync -rmnv -f +_README -f -_* ftp.is.co.za::mirror/ ftp.debian.org/ftp.us.debian.org/debian [snipped] receiving file list ... done sent 23 bytes received 9 bytes 7.11 bytes/sec total size is 0 speedup is 0.00 (DRY RUN) But for the case when use of the following rsync server, both case will succeed: werner at debian:~$ rsync -rmnv -f +_README -f -_* ftp.cn.debian.org::debian [snipped] receiving file list ... done drwxr-xr-x 4,096 2015/04/14 11:34:19 . -rw-rw-r-- 1,370 2015/01/10 18:21:28 README sent 47 bytes received 1,389 bytes 319.11 bytes/sec total size is 1,370 speedup is 0.95 (DRY RUN) werner at debian:~$ rsync -rmnv -f +_README -f -_* ftp.cn.debian.org::debian/ [snipped] receiving file list ... done drwxr-xr-x 4,096 2015/04/14 11:34:19 . -rw-rw-r-- 1,370 2015/01/10 18:21:28 README sent 47 bytes received 1,389 bytes 574.40 bytes/sec total size is 1,370 speedup is 0.95 (DRY RUN) Any hints on this issue? Regards> > > Paul-- .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
Paul Slootman
2015-Apr-14 09:36 UTC
Two same rsync commands give different results on two debian mirrors.
On Tue 14 Apr 2015, Hongyi Zhao wrote:> On Tue, 14 Apr 2015 09:32:10 +0200, Paul Slootman wrote: > > > On Tue 14 Apr 2015, Hongyi Zhao wrote: > >> > >> See the following commands: > >> > >> ___________________________ > >> > >> $ rsync -rmnv -f +_README -f -_* ftp.is.co.za::mirror/ftp.debian.org/ > >> ftp.us.debian.org/debian > > Please see the above line including the part of line-wrapping. I've usedYou should ensure your messages don't mangle the command lines you want to show. You could have inserted a \ and a newline before the hostname: $ rsync -rmnv -f +_README -f -_* \ ftp.is.co.za::mirror/ftp.debian.org/ftp.us.debian.org/debian> In fact, the issue I meet is as follows, see the following for detail: > > 1- If I append the `/' in the end of the tree, I'll succeed:That's right, by appending the / you start at the contents of the given directory, not with the directory itself. Without the / rsync needs to recurse into the directory, but you've excluded '*' in your filter so it can't reach the README.> But for the case when use of the following rsync server, both case will > succeed: > > werner at debian:~$ rsync -rmnv -f +_README -f -_* ftp.cn.debian.org::debianThis is because the ::debian part is not a directory, it's a module name and hence the starting point is the contents of the module's directory, which contains README so that can be found. Paul
Hongyi Zhao
2015-Apr-14 10:16 UTC
Two same rsync commands give different results on two debian mirrors.
On Tue, 14 Apr 2015 11:36:20 +0200, Paul Slootman wrote:> ou should ensure your messages don't mangle the command lines you want > to show. You could have inserted a \ and a newline before the hostname: > > $ rsync -rmnv -f +_README -f -_* \ > ftp.is.co.za::mirror/ftp.debian.org/ftp.us.debian.org/debianThanks a lot for your hints. I'll do by using the trick from now on ...> > >> In fact, the issue I meet is as follows, see the following for detail: >> >> 1- If I append the `/' in the end of the tree, I'll succeed: > > That's right, by appending the / you start at the contents of the given > directory, not with the directory itself. Without the / rsync needs to > recurse into the directory, but you've excluded '*' in your filter so it > can't reach the README.Thanks a lot for your notes.> >> But for the case when use of the following rsync server, both case will >> succeed: >> >> werner at debian:~$ rsync -rmnv -f +_README -f -_* >> ftp.cn.debian.org::debian > > This is because the ::debian part is not a directory, it's a module name > and hence the starting point is the contents of the module's directory, > which contains README so that can be found.Again, thanks a lot for your notes. Regards> > > Paul-- .: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.
Reasonably Related Threads
- Two same rsync commands give different results on two debian mirrors.
- Two same rsync commands give different results on two debian mirrors.
- The complicated filter rule used by me worked for one Debian mirror and not for the other.
- The complicated filter rule used by me worked for one Debian mirror and not for the other.
- Finding specific files/directories from a remote rsync server.