Specifying rsync__exclude options for default /vagrant shared folder

100 views
Skip to first unread message

Paul O'Flynn

unread,
Mar 9, 2016, 6:56:01 PM3/9/16
to Vagrant
Hi All,

When provisioning we wget a bunch of large binaries into the guest which works fine but takes some time. I had the brainwave of putting them into /vagrant/tmp thus they would survive a vagrant destroy and already be there the next time the users vagrant up. However sometimes they want to vagrant up to AWS and when they do all of those large binaries are getting rsync'ed up to AWS. So for the cases when they are not using VirtualBox, I would like to specify an 'rsync_exclude "/vagrant/tmp/*" option. Is that possible?

I know there are other options like vagrant-cachier (can't use it because out wgets have to use the -o option) or simply create a new shared folder and use that as a cache and specify an exlude option on that. The latter works, but it would be nice to keep everything contained in one single vagrant directory if possible. 

Thanks in advance,

Paul

Alvaro Miranda Aguilera

unread,
Mar 9, 2016, 7:44:59 PM3/9/16
to vagra...@googlegroups.com
Hello Paul,

If I understand correctly, and please let me know if I got it wrong this is what you want.

You have a folder like this:

app/
app/Vagrantfile
app/tmp/
app/tmp/<files>

If you have this as part of the projects, on each run/vagrant up it will be synced using rsync or virtualbox shared folder.

So no extra setup needed.

Can you elaborate more on this?

Thanks
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/19d34d2f-451f-4b66-a146-a395fd831abf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul O'Flynn

unread,
Mar 9, 2016, 7:53:30 PM3/9/16
to Vagrant
If I understand correctly, and please let me know if I got it wrong this is what you want.

You have a folder like this:

app/
app/Vagrantfile
app/tmp/
app/tmp/<files>

If you have this as part of the projects, on each run/vagrant up it will be synced using rsync or virtualbox shared folder.


Correct - but I'm being a pain in the butt and not wanting app/tmp/* to be rsynced, in the cases where rsync would be used (e.g. AWS)... Obviously we still would need all the other file in app to be rsynced, like app/cookbooks in the case of Chef.

Make sense?

Thanks for the very fast reply.

Paul 

Alvaro Miranda Aguilera

unread,
Mar 9, 2016, 8:04:44 PM3/9/16
to vagra...@googlegroups.com
hello.

Maybe I missing something but rsync is done for that.

First Sync 45 seconds.

mini:Downloads kikitux$ time rsync -PazHl github_backup/ tmp/test/ &>/dev/null

real 0m45.848s


Second 0.2 seconds.

mini:Downloads kikitux$ time rsync -PazHl github_backup/ tmp/test/ &>/dev/null

real 0m0.206s

So, i think is a little side effect have a 2nd sync.


Alvaro.



--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.

Paul O'Flynn

unread,
Mar 10, 2016, 3:13:19 PM3/10/16
to Vagrant

Maybe I missing something but rsync is done for that.

Yes it is, but the issue is I don't want it to be. I'd like everything under app/ to be rsynced except app/tmp/*, make sense? My provisioning scripts put all kinds of large binaries in app/tmp/ which is great as they are cached for re-use when using VirtualBox but awful when I switch to AWS and they get rsynced up to AWS and that takes forever.

Thx. 
Reply all
Reply to author
Forward
0 new messages