Sorry to do this .... AGAIN

Every year or two I get stuck on this same problem involving
excluding.

Seems I learn how its done then 2yrs later I've totally forgotten and
when I look up my notes ... this new need is just different enough
that they  don't apply.

Here's the problem. (Simplified... and I've skipped some of the
repetitive output)

On remote
ls A/ 
   a/ b/ c/ d e

on local
pwd 
 /rmh/dir


from local
rsync -avvz --exclude-from=file user@remote:/A/ /rmh/dir/

  cat 'file':

   *
   + a
   + b

That results in: Sender hiding a/ because of pattern *
"     ... ditto ...          " b/ because of pattern *
"     ... ditto ...          " c/ because of pattern *
"     ... ditto ...          " d  because of pattern *
"     ... ditto ...          " e  because of pattern *

   [...]

  cat file:

   *
   + a/*
   + b/*

  Same result

  cat file:

   *
   + a/**
   + b/**

  Same result

Then put the directories ahead of the asterisk
 
   + a/
   + b/
   *
Nearly the same with this difference:
          showing directory a/ (but its still blocked along with
                               everything below)
          showing directory b/ (but its still blocked along with
                               everything below)

  The rest of the output the same as before hiding etc etc
  But the list is a little longer since it now includes the files
  directly under a and b

Ok, I start adding asterisks a/*
                             a/**
                             a/**/

All get the result similar to the first examples... everything hidden

OK, so how can I transfer only a and b.

I mean besides changing my command to read something like:

rsync -avv  user@remote:/A/a  user@remote:/A/b  /rmh/dir

Which would work, but since the directories involved are many layers
deep it turns into a ridiculous exercise... especially since I know
there is some syntax that will do this.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to