Two same rsync commands give different results on two debian mirrors.

Paul Slootman paul+rsync at wurtel.net
Tue Apr 14 03:36:20 MDT 2015


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 used 

You 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::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.


Paul


More information about the rsync mailing list