Skip to content
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 selective folder sync for bidirectional syncing #3188

Closed
tomgud opened this issue Mar 13, 2014 · 9 comments
Closed

rsync selective folder sync for bidirectional syncing #3188

tomgud opened this issue Mar 13, 2014 · 9 comments

Comments

@tomgud
Copy link

tomgud commented Mar 13, 2014

The 1.5 rsync is amazing but for production I feel there is something missing. As mentioned in #3062 rsync-pull would solve some of the problems but I feel it can be solved more completely.

I believe many users of vagrant, work on source files in the host machine, then synchronize that with the guest machine. The output is then for viewing on the host machine.

What I am suggesting is that there is a folder list that can be configured such as

  • host_to_guest_folders: ["src", "lib", ...]
  • guest_to_host_folders: ["bin", "web", ...]
  • ignored_folders: [".git", ...]

This would allow users to have bidirectional rsync on selective folders when users know what should be overwritten by the guest machine, and what should be overwritten by the host machine.

I imagine this could have other benefits for those who want to use rsync.

@mitchellh
Copy link
Contributor

I'll make sure this gets in with the rsync-pull stuff.

@tomgud
Copy link
Author

tomgud commented Mar 18, 2014

I haven't found any online documentation on rsync regarding this flag, but it worked for me.

-rz

Using this flag I can rsync from the guest machine to the host machine.

@marfillaster
Copy link

+1 with this feature. Windows is my host and I need to get some generated files from the guest.

@kevinastone
Copy link

@tomgud -rz adds recursion and compression, but doesn't change the direction of syncing.

@tomgud
Copy link
Author

tomgud commented Apr 22, 2014

@kevinastone Thanks, my bad. I guess I just overlooked the setup of my command, which included the guest machine first and host machine second, which will of course do it in reverse.

@mvolo
Copy link

mvolo commented Aug 21, 2014

I use PuTTY and easily cp files from anywhere on my vagrant to the /vagrant folder and it will show up on the Windows host. The /vagrant folder inside PuTTY is the Windows directory on the host.

@dmatora
Copy link

dmatora commented Jan 15, 2015

consider using https://github.com/dmatora/vagrant-unison
it delivers realtime bidirectional folder sync

@ehernandez-xk
Copy link

Hi all, I'm trying to get sync my files in bidirectional way.
After a lot of research I did not find an standard solution or is not documented.

Any suggestion about how to do rsync from host to guess and vice verse?

additional:
Where the -rz flag is used?

Thaks

@ehernandez-xk
Copy link

After a long time I decided to use nfs instead of rsync by the moment everything works.

@ghost ghost locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants