Re: Use of --include and --exclude when source paths are not known
To answer my own question - the answer was to run a find first, saving the
output as a file, then use the --files-from option to rsync.
Two further issues though... a minor one is that using --files-from seems to
prevent any possibility of deleting orphans at the remote end. More
importantly, windows permissions inheritance gets hosed by rsync, every
time. Use of 'nontsec' doesn't help.
Can anyone help before I abandon rsync?
"Mike Ray-Jones" <firstname.lastname@example.org> wrote in message
> I want to use rsync to synchronise just selected directories. The source
> structure looks like this:
> There are 000's of folders 'xxxx' containing 000's of files (foo, bar etc)
> that I don't want to sync; the destination should be just the 'external'
> directory and its contents, thus:
> I tried the following cmd line:
> rsync -avR --delete --include "external/" --exclude "*" "0" remote::test
> ... but the --exclude "*" is excluding the whole of "0/". I can't[/color]
> name the parents of all the "external" folders - there are 000's are they
> are always changing. What am I missing here? Do I need a script?
> Any help would be gratefully received.