Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't exclude multiple directories #22

Open
pozitron57 opened this issue Aug 23, 2016 · 2 comments
Open

Can't exclude multiple directories #22

pozitron57 opened this issue Aug 23, 2016 · 2 comments

Comments

@pozitron57
Copy link

With args: '--exclude=dir1' works fine, dir1 is excluded. How to exclude multiple directories? I tried

args: '--exclude=dir1 --exclude=dir2'
args: '--exclude={dir1,dir2}'
exclude: [dir1, dir2]
exclude: ['dir1', 'dir2']

with no luck. Rsync doesn't exclude anything with these setups.

Well, finally I figured out that it can be done like this:

args: '--exclude-from=list-of-files-to-exclude'

where list-of-files-to-exclude is file where all directories and files to be excluded are listed:

dir1
dir2
@xiaosiyu0603
Copy link

Unfortunately I got the same problem at persent.

@thom4parisot
Copy link
Member

Thanks for the tip of --exclude-from.

I suspect some escaping happens when using multiple options, which is treated as a single option --exclude=dir1\ --exclude=dir2 (so the value of --exclude is dir1 --exclude=dir2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants