Re: Use of --include and --exclude when source paths are not known

This is a discussion on Re: Use of --include and --exclude when source paths are not known within the Rsync forums, part of the Networking and Network Related category; To answer my own question - the answer was to run a find first, saving the output as a file, then ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2004
Mike Ray-Jones
 
Posts: n/a
Default 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?

Thanks
Mike.

"Mike Ray-Jones" <mike@ray-jones.org.uk> wrote in message
news:406b33db$0$65064$65c69314@mercury.nildram.net ...
> I want to use rsync to synchronise just selected directories. The source
> structure looks like this:
>
> 0/
> 0/xxx1/foo
> 0/xxx1/bar
> 0/xxx1/external/
> 0/xxx1/external/foo
> 0/xxx1/external/bar
> 0/xxx2/foo
> 0/xxx2/bar
> 0/xxx2/external/
> 0/xxx2/external/foo
> 0/xxx2/external/bar
> ...
> 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:
>
> 0/xxx1/external/
> 0/xxx1/external/foo
> 0/xxx1/external/bar
> 0/xxx2/external/
> 0/xxx2/external/foo
> 0/xxx2/external/bar
> ...
> 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

explicitly
> 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.
>
> Mike.
>
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:12 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0