Hey Chandu,
I know this is late, but I was just browsing some old posts in this group.
I faced the same problem so I created a new vagrant plugin. Install it by
running:
vagrant plugin install vagrant-force-rsync
Then, include this provisioner anywhere in the vagrantfile that you want to
sync. I usually put it after any host-shell provisioners.
config.vm.provision "force-rsync"
Please note that it is VERY limited and only syncs the root host folder to
/vagrant on the guest with the default rsync options. I am not very good at
interfacing with Vagrant's objects in Ruby, so it is pretty hacky. You
would be able to modify the source if you need to sync some other folders
though.
On Sunday, March 15, 2015 at 12:41:13 PM UTC-4, Chandu wrote:
>
> Thanks Alvaro.
> I am using reload now.
> I was thinking if there is any alternative (like vagrant provision)
> instead of reloading the VM.
> -
> Chandu
>
> On Sun, Mar 15, 2015 at 12:03 AM, Alvaro Miranda Aguilera <
> [email protected] <javascript:>> wrote:
>
>> Can you paste your vagrantfile ?
>>
>> and a sample of the directory?
>>
>> if you are adding subdirectories in the shared folder, vagrant rsync
>> should do the trick
>>
>> http://docs.vagrantup.com/v2/synced-folders/rsync.html
>>
>> if are new synced folder, then vagrant reload ?? you can try `vagrant
>> rsync` first
>>
>> On Sun, Mar 15, 2015 at 6:09 AM, Chandu <[email protected]
>> <javascript:>> wrote:
>> > Hi,
>> > I am using rsync to sync files from my windows host to ubuntu guest.
>> > Right now when I vagrant up my ubuntu machine as per the config in
>> vagrant
>> > file folder A is synced.
>> >
>> > What I would like to do is after my ubuntu guest is up, I would like to
>> add
>> > new folders for rsync in my Vagrantfile and be able to get them synced.
>> >
>> > I tried using vagrant rsync after I edited my vagrant file but it is not
>> > picking new folders.
>> >
>> > Is it possible to add new folders and get them synced?
>> >
>> > --
>> > 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 [email protected] <javascript:>.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Vagrant" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/vagrant-up/HOXfKKtDgx0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.