Closed shaharsol closed 8 years ago
@shaharsol Synced folders (of the rsync type) are a one-way sync. See the following from the official vagrant documentation: https://www.vagrantup.com/docs/synced-folders/rsync.html
The rsync synced folder does a one-time one-way sync from the machine running to the machine being started by Vagrant.
To my knowledge, this is no easy way to setup a two-way sync with Digital Ocean backed machines (or AWS for that matter). I've been playing with this stuff a lot lately, and haven't come up with a good solution myself yet, other than building something that sits alongside vagrant or creating my own vagrant plugin.
@davidalger Oh I'm new to vagrant, just through with the getting started where they show how you touch a file on the guest system and it's reflected on the hosting system via synced folders. I thought I could expect this type of behaviour from any provider.
So what are my options, assuming my goal is to have files created on the guest system in DigitalOcean being synced back to the hosting system? maybe NFS?
@shaharsol On a local provider such as virtual box or vmware, such is the case by default because synced folders use the virtual box or vmware file sharing system to essentially "mount" local files in the guest. NFS or SMB also accomplish the same thing. Since Digital Ocean is remote, synced folder types are more limited. I haven't personally tried doing NFS, but I doubt it's supported, as read/write performance on the guest would be terrible and would require your machine stay online to work. You might try them, but I doubt it will work well if it even functions at all :) Beyond that, I don't really have any good solution for a two-way sync.
my Vagrantfile:
after I run
vagrant up
I thenvagrant ssh
to the machine at Digital Ocean, where Icd /vagrant
and thentough foo
. a simplels foo
then shows me the new file. However, back in the host machine a simplels foo
saysno such file or directory
. I tried a manualvagrant rsync
and it doesn't seem to do anything as well.Anything I'm doing wrong?