Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

rsync__exclude not excluding anything at all #304

Closed
dsantanu opened this issue Oct 22, 2014 · 6 comments
Closed

rsync__exclude not excluding anything at all #304

dsantanu opened this issue Oct 22, 2014 · 6 comments
Milestone

Comments

@dsantanu
Copy link

I can sync directories without any issue but if I want to exclude certain file-type(s) it doesn't work at all. I wanted all the .json and .sh files to be excluded, so I have this:

config.vm.synced_folder "./scripts", "/var/tmp/"+nodes_cfg['aws_env']+"/scripts", 
                         type: "rsync", rsync__exclude: [ "*.json", "*.sh"]

which is syncing scripts alright but with everything in it, including the file-types in the rsync__exclude list. Did I do anything wrong here or anything am I still missing? Best!

@ColinHebert
Copy link
Contributor

Fixed by #320

@cameronraysmith
Copy link

Vagrant 1.7.2
vagrant-aws 0.6.0

I am experiencing the equivalent of #304 and hashicorp/vagrant#4248: rsync does not respect excludes. The suggestion in this comment, that the method implemented in #156:

config.vm.synced_folder '.', '/vagrant', :rsync_excludes => ['chef/tmp', 'tmp']

resolves the issue is also not working for me.

@ColinHebert
Copy link
Contributor

This issue should be closed

@michaek
Copy link

michaek commented Apr 28, 2016

@rtyler I'm not sure this issue should be closed - the last comment says "the method implemented in ... is also not working for me", though some of what I've replaced with an ellipsis makes it harder to parse that meaning.

I'm also not able to successfully exclude files from the rsync, using any of the documented configuration.

@michaek
Copy link

michaek commented Apr 28, 2016

Currently, I'm working around this with the following:

vagrant ssh-config > ssh.config # One time, for the following command
rsync -ravz -e "ssh -F ssh.config" --exclude .vagrant --exclude .git --exclude-from .gitignore --delete ./ default:/vagrant/

An upside is that when the delta is small the bare rsync command is many times faster than the rsync command wrapped in Vagrant initialization and abstraction.

@michaek
Copy link

michaek commented Apr 28, 2016

Actually - the implementation does work. The problem that I was running into, and perhaps the problem of others, is that (as documented) changes to the Vagrantfile require a vagrant reload to take effect, and I was expecting those changes to be immediately applied to a vagrant provision or a vagrant rsync command, and they were not.

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

No branches or pull requests

5 participants