Bidirectional Vagrant Rsync

I configured Vagrant to use Rsync shared folders instead of the (incredibly slow) vboxsf file system provided by VirtualBox by default:

 Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__args: ["--verbose", "--archive", "-z"] end 

Obviously there are more settings, but I found these instructions here and they usually work in sync from host to guest.

However, I need the guest to be able to synchronize with the host, as some of my build tools are only installed on the guest computer. How can I synchronize bidirectional transfer in a shared folder?

+8
vagrant virtualbox rsync
source share
3 answers

Unfortunately no, quote from documentation :

The synchronized rsync folder performs a one-time one-way synchronization from the computer running Vagrant.

so you better use NFS (or SMB if you are using a Windows host)

In some cases, default public folder implementations (such as VirtualBox public folders) have high performance. If you see poor performance with synchronized folders,

+4
source share

Consider using the vagrant plugin https://github.com/smerrill/vagrant-rsync-back#vagrant-rsync-back

Installation:

 vagrant plugin install vagrant-rsync-back 

To run:

 vagrant rsync-back 

It will be rsync mapped folders from guest to host

+9
source share

Consider using this firewall http://github.com/dmatora/vagrant-unison It performs synchronization in a bidirectional folder in real time

+1
source share

All Articles