exclude a pattern but only in the top level

2013-05-15 Thread Brian K. White
Consider the following directory structure /foo/aaa/*/* /foo/bbb/*/* /foo/ccc/*/* I want to sync all of /foo, but exclude /foo/aaa but not exclude any other occurances of "aaa" or "foo/aaa" (be they files or dirs) that might occur within the other dirs /foo/bbb/* /foo/ccc/* etc I don't want

Re: exclude a pattern but only in the top level

2013-05-15 Thread Matthias Schniedermeyer
On 15.05.2013 04:13, Brian K. White wrote: > How can I get it to exclude just the top-level directory "/foo/aaa" ? With a '/' at the beginning you pin the pattern to the beginning. You don't use "/" at the end of directory names, so i'm not sure if the correct one is: /aaa or /foo/aaa With a '/'

Re: exclude a pattern but only in the top level

2013-05-15 Thread Brian K. White
On 5/15/2013 4:13 AM, Brian K. White wrote: Consider the following directory structure /foo/aaa/*/* /foo/bbb/*/* /foo/ccc/*/* I want to sync all of /foo, but exclude /foo/aaa but not exclude any other occurances of "aaa" or "foo/aaa" (be they files or dirs) that might occur within the other dir

Re: exclude a pattern but only in the top level

2013-05-15 Thread Paul Slootman
On Wed 15 May 2013, Brian K. White wrote: > Consider the following directory structure > > /foo/aaa/*/* > /foo/bbb/*/* > /foo/ccc/*/* > > I want to sync all of /foo, > but exclude /foo/aaa > rsync -avz /foo ${DEST}::root Firstly, I always recommend that with directory transfers you add a trail

Re: exclude a pattern but only in the top level

2013-05-15 Thread Brian K. White
On 5/15/2013 5:17 AM, Paul Slootman wrote: On Wed 15 May 2013, Brian K. White wrote: Consider the following directory structure /foo/aaa/*/* /foo/bbb/*/* /foo/ccc/*/* I want to sync all of /foo, but exclude /foo/aaa rsync -avz /foo ${DEST}::root Firstly, I always recommend that with dire

Re: exclude a pattern but only in the top level

2013-05-15 Thread Paul Slootman
On Wed 15 May 2013, Brian K. White wrote: > > rsync -avz /foo/ ${DEST}::root/foo/ > > This syntax does work in his case, and is easier to read, because it > ends up using the exact same specification "/foo/" and "/foo/" for > both source and dest, but the syntax I had was also correct. I no > lon

Re: exclude a pattern but only in the top level

2013-05-15 Thread Brian K. White
On 5/15/2013 8:35 AM, Paul Slootman wrote: On Wed 15 May 2013, Brian K. White wrote: rsync -avz /foo/ ${DEST}::root/foo/ This syntax does work in his case, and is easier to read, because it ends up using the exact same specification "/foo/" and "/foo/" for both source and dest, but the syntax

Don't follow bind mounts?

2013-05-15 Thread Carl Brewer
Hello, The manual says that rsync treats bind mounts on UNIX (Linux) to the same filesystem as being on the same filesystem. I have a server with a pile of bind mounts to the same filesystem for some access control/ease of use for FTP users modifying websites. This makes my backups using rs

Re: exclude a pattern but only in the top level

2013-05-15 Thread Paul Slootman
On Wed 15 May 2013, Brian K. White wrote: > I did in the case when it was only one pattern, but that was just a > simplified example. > > The actual job involves too many include and exclude patterns to use > --include & --exclude, or even --include-from and --exclude-from, > because the patterns