-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Rsync not respecting rsync__exclude on *initial* sync #4248
Comments
I believe I am seeing this same behavior for two of our developers. We are working around the issue but would like to make sure that the excluded directories are never rsynced. |
@mitchellh should this issue be here or in vagrant-aws? happy to move it over |
@sursh The AWS provider doesn't use the core rsync synced folder (they/me implemented their own). I don't actively maintain it currently but you should open a bug there, there are other comitters that should fix this. Thanks! |
For anyone else with this problem, there is an undocumented way that works: mitchellh/vagrant-aws#156 |
@mitchellh I'm seeing this behavior while using the virtualbox provider as well. Same as described above:
|
@dustMason, your issue might (or might not) be related to #4567 . I started on this thread. |
I have the same problem : Vagrant 1.7.2
When for example I work on project_1, I rsync websites, exlcude project_2 and exclude project_1/node_modules. I want to only install node modules on the VM, it works when I vagrant up on initial rsync, but as soon as I "vagrant rsync-auto" the exclude project_1/node_modules is not respected and my VM node_modules folder is removed (as not present on the host). If I then "mkdir node_modules" in project_1, it is not removed in the VM as expected. Any update or solution for respecting the exclude on initial vagrant rsync-auto ? Thank you |
I'm trying to get Vagrant to sync
.
to/vagrant
, as is the default behavior, except for a few folders that I'd like to exclude. I'm finding that rsync is NOT respecting rsync__exclude on first sync when the VM is created, but seems to be working on subsequent rsyncs.I'm following along with this documentation. I added an exclude line to my
Vagrantfile
:I know that rsync sees this, since running
vagrant rsync
gives the following output:and when I blow away the contents of
/vagrant
and re-rsync withvagrant rsync
, those files & folders are not recreated, as expected.However, when the machine is initially created, the exclude is NOT respected and .git/ and data/ are copied over. Here is the relevant output from that process.
and when I ssh into the box:
What's going on here? Why the different behavior? And can I get the initial rsync to exclude certain folders?
The text was updated successfully, but these errors were encountered: