> > I've tried all possible combinations
> > of leading and trailing slashes, stars, etc, found in the man page:
> > 
> >  /mnt/pc/machine/D/Music
> >  /mnt/pc/machine/D/Music/
> >  /mnt/pc/machine/D/Music/*
> >  /mnt/pc/machine/D/Music/**
> >  mnt/pc/machine/D/Music
> >  mnt/pc/machine/D/Music/
> >  mnt/pc/machine/D/Music/*
> >  mnt/pc/machine/D/Music/**
> > 
> > The rest (even those with dreaded spaces in the names) 
> > work.  But it still keeps copying and updating this guy's 
> > music files (lots of WAVs). 
> 
> I don't understand why those paths are getting copied at all; they're
> not under /mnt/pc/machine/share.  Or are you using the word "share" as
> a generic name meaning something like "C" and "D" and you're 
> copying them both?

Yes, sorry, an inconsistency on my part!  The "s" in samba/smb stands for
share.  Replace "D" with "share" and my explanation is consistent.

> > I'm not an expert with rsync, so someone please correct me 
> > if I've got this wrong, but I think the way to exclude 
> > /mnt/pc/machine/D/Music would be like this:
> >   /Music/
> > Otherwise it's looking to exclude:
> >   /mnt/pc/machine/share/mnt/pc/machine/D/Music,
> > which of course doesn't exist.
> 
> Assuming Bart is actually specifying /mnt/pc/machine/D as the source,
> Mike's answer is almost right.  The paths will start with "D" 
> since that's the basename of the source and the source doesn't 
> end with a trailing slash.  If I were Bart, I'd add the trailing 
> slash so the paths can start with Music.

I added the trailing slash, re-wrote my script (called by crontab) to 
use --exclude-from=exclude.$machine for each $machine, and created the 20 or
so exclude.* files (almost all identical) for the windows boxes.  I can now
exclude on a per-machine basis, each relative to /mnt/pc/$machine/$share/.
It works!

>From the man page:

       "when used with -r  (which  is  implied  by  -a),
       every subcomponent of every path is visited from top down,
       so include/exclude patterns  get  applied  recursively  to
       each subcomponent."

       "...base of the tree."

I guess I didn't make the connection from these phrases that the base of the
tree is not the beginning of a path
(/mnt/pc/machine/share/blah/blah/blah.txt), or that the "path" here is
relative to the source path in the rsync command.

Thanks for your help,

Bart
--
Bart Brashers                   MFG Inc.
Air Quality Meteorologist       19203 36th Ave W Suite 101
[EMAIL PROTECTED]        Lynnwood WA 98036-5707
http://www.mfgenv.com           425.921.4000 Fax: 425.921.4040


-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to