Vagrant: rsync not included in msysgit

Created on 17 Mar 2014  ·  26Comments  ·  Source: hashicorp/vagrant

Your blog post claims that rsync is included in msysgit. Unfortunately, that's not the case.

If we do switch to rsync synchronization, our getting started guide is going to increase in length substantially -- I haven't found an easy installer for rsync yet.

Perhaps you can include rsync in your Windows installer?

Most helpful comment

I think bundling rsync and openssh for Windows is a good idea. This eliminates the extra step of installing Cygwin (or something else) with the right packages and therefore makes it easier for people to get started with the Vagrant VM.
Using a Vagrant VM should really be super simple. Just install Vagrant and execute "vagrant up". Nothing more.

All 26 comments

y have used grsync that is very small, is front end, but came with
rsync.exe that you can use directly, is just 6mb installer.

http://sourceforge.net/projects/grsync-win/files/

hope this helps.

On Mon, Mar 17, 2014 at 4:01 PM, Bryan Larsen [email protected]:

Your blog post claims that rsync is included in msysgit. Unfortunately,
that's not the case.

If we do switch to rsync synchronization, our getting started guide is
going to increase in length substantially -- I haven't found an easy
installer for rsync yet.

Perhaps you can include rsync in your Windows installer?

Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/vagrant/issues/3236
.

@kikitux you mean set rsync.exe that comes with grsync into the path?

Same problem here, I'm using Vagrant with msysgit.
I tried placing cwrsync in my path, but that resulted in Cygwin errors.

one of my coworkers tried grsync, cwrsync and qtdsync. They all failed with protocol errors (perhaps because of drive letter problems), and none of their installers put rsync into PATH.

@yoshz @bryanlarsen The "protocol" errors you're seeing are different from this issue and I believe are fixed in git or there are PRs to fix them. They're simply path issues (cygwin expects cygwin paths, mingw expects mingw paths, etc.).

As for including rsync with Vagrant itself: I would if there is a small enough binary and the licensing of that binary allows me to include it. Otherwise, Vagrant already tries to find rsync on the path and shows an error if it isn't installed, which is good enough (at least it doesn't crash out or something).

@mitchellh: I suspect you're right -- my coworker's problems did seem to be related to the paths used.

as for including rsync: are you comfortable including a GPLv3 binary in Vagrant? If not, tracking down a small binary is moot...

@bryanlarsen I _believe_ that'd be okay. GPL only cares about linking to the binary, correct. If we don't ever link to it (and just execute it), then there isn't an issue? We just have to redistribute the rsync source if people request, which would be unmodified

@mitchellh, re GPLv3: that's my understanding, but I'm not a lawyer.

re the protocol fix, are you referring to #3086? given kylemcfarlane's comment on #3086 you may have fixed the problem for some but broken it for others. bundling your own rsync may avoid the whole problem of figuring out which rsync is installed and adjusting paths accordingly...

@bryanlarsen Thanks for mentioning the quickfix of kylemcfarlane, but your are pointing to the wrong ticket :)
https://github.com/mitchellh/vagrant/issues/3230#issuecomment-37757086

Got it working now using cwrsync.

@yoshz. cwrsync is cygwin based. cygwin based rsync's are fixed using either the hack you used or the current master. However, it's my belief based on the comment I referenced that msys based rsync's are broken in some scenarios.

@mitchellh: the prebuilt rsync's on the web are cygwin based and run at around 5MB (because they include the cygwin dll's). However, it appears that you already include a fairly complete minimal msys distribution on windows in C:\HashiCorp\Vagrant\embedded, so adding rsync to there should only take a few hundred kilobytes.

Unfortunately, I'm not a Windows guy, and I have no idea how your installer is created, so I cannot be of much help. If I was more of a Windows guy we probably wouldn't be using Vagrant in the first place. :)

Any plans on adding rsync to vagrant windows installer on vagrant 1.6??? pleeeease??? :smiley:

including rsync with vagrant installer would be really helpful!

+1

I currently bundled my my own rsync.exe and the required dlls from grsync with my application to support rsync on windows with vagrant.

+1 bundeling rsync with Vagrant would be a real benefit.

Also it would be great to bundle openssh.

I think bundling rsync and openssh for Windows is a good idea. This eliminates the extra step of installing Cygwin (or something else) with the right packages and therefore makes it easier for people to get started with the Vagrant VM.
Using a Vagrant VM should really be super simple. Just install Vagrant and execute "vagrant up". Nothing more.

I'm confused, can anyone summarize which version of rsync (URL would be great) works with Vagrant 1.6.3?

I tried cwRsync 5.3.0 and got this:

rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.0]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.1pre1]

So I tried cygwin but got this:

rsync: change_dir "/d/project/vagrant" failed: No such file or directory (2)

I tried MinGW but got this:

Error:       0 [main] ssh 8796 open_stackdumpfile: Dumping stack trace to ssh.exe.stackdump
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8]

With grsync:

rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.0]
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at /home/lapo/packaging/rsync-3.0.4-1/src/rsync-3.0.4/io.c(791) [sender=3.0.4]

At some point, I also got this, I can't tell anymore which executable I've tried:

Error: /cygdrive/c/Program Files (x86)/cwRsync/rsync: unknown option -- chmod=ugo=rwX

Is there any way to get the Docker provider working on Windows?

@hheimbuerger,

which rsync works best depends partially on what shell you're using. If you're using msys (or msysgit, which is what is included in the git installer) then use the rsync from msys; if you're using cygwin then use the rsync from cygwin. (although I'm only sure of msys).

Installing the msys rsync into msysgit isn't easy; we find it easier to install msys via https://sourceforge.net/projects/mingw/files/latest/download and install its git, openssh & rsync.

Preferably, I'd like to not use/install a special shell at all for Vagrant. (And going forward, I don't think Vagrant should expect you to run a specific shell.)

@seshendra do you have any technique for automatically adding the distributed rsync to the path so vagrant finds it? Or users need to do that manually?

@Arkins - I did it manually on git bash. However,

If you are ok with using windows powershell console instead, you can use
choclatey, which is an apt-get kind of package manager for windows [
http://chocolatey.org/packages?q=rsync] to automatically install rsync by
issueing cinst cwrsync from the console. This will automatically add
rsync to the path and you can use vagrant up with rsync.

Actually I've been quite happy using the console than the slow mingw git
bash.

On Mon, Jul 21, 2014 at 1:55 AM, Rhys Arkins [email protected]
wrote:

@seshendra https://github.com/seshendra do you have any technique for
automatically adding the distributed rsync to the path so vagrant finds it?
Or users need to do that manually?


Reply to this email directly or view it on GitHub
https://github.com/mitchellh/vagrant/issues/3236#issuecomment-49558441.

is there an update for this issue?

Agreed, this would be fantastic for windows users.

+1
I tried cwRsync but unix-style paths (/d/ instead D:) are passed to rsync,
so vagrant fails when transferring the ssh key after booting the guest VM.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lebogan picture lebogan  ·  3Comments

tomhking picture tomhking  ·  3Comments

janw-me picture janw-me  ·  3Comments

RobertSwirsky picture RobertSwirsky  ·  3Comments

hesco picture hesco  ·  3Comments