S3Sync.net

General Category => Questions => Topic started by: maelcum on April 27, 2007, 03:40:23 PM



Title: Can the --exclude="..."-option be used multiple times?
Post by: maelcum on April 27, 2007, 03:40:23 PM
Hm.

When I use something like "s3sync.rb -v -r -s --exclude="crit1" /source/path bucket:" things work beautifully.

Another exclude though seems to override the first one.
So "./s3sync.rb -v -r -s --exclude="crit1" --exclude="crit2" /source/path bucket:" excludes all files that have crit2 in their path, but not the crit1 ones...

Just for sakes I have tried to --exclude="crit1|crit2" which does not work.
Yes, I know --exclude takes regex's, but it was worth a try... ;-)

Right now, I'd need some 8 exclusions in a file list of some 30000 files. Can this be made to work?



Title: Re: Can the --exclude="..."-option be used multiple times?
Post by: ferrix on April 27, 2007, 04:30:46 PM
You can't specify the option multiple times.  You have to make a regex for it.

"(?:crit1|crit2|etcetc)"

depending on your shell: make sure it's not eating or mangling the characters inside the quotes.


Title: Re: Can the --exclude="..."-option be used multiple times?
Post by: maelcum on May 05, 2007, 09:26:42 AM
Hi,

just wanted to give feedback: Works great!
The exclusion list is growing longer, and I am very carefully checking each sync if things are what they should be, but theres no problem.

Really really great. Thanks!