Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is this rsync connection unexpectedly closed on Windows? [closed]

Tags:

windows

rsync

I'm trying to use rsync on Windows 7. I installed cwRsync and tried to connect to Ubuntu 9.04.

$ rsync -azC --force --more-options ./ user@server:/my/path/ 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.5] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(610) [sender=3.0.8] 
like image 311
rkmax Avatar asked Aug 31 '11 17:08

rkmax


1 Answers

The trick for me was I had ssh conflict.

I have Git installed on my Windows path, which includes ssh. cwrsync also installs ssh.

The trick is to have make a batch file to set the correct paths:

rsync.bat

@echo off SETLOCAL SET CWRSYNCHOME=c:\commands\cwrsync SET HOME=c:\Users\Petah\ SET CWOLDPATH=%PATH% SET PATH=%CWRSYNCHOME%\bin;%PATH% %~dp0\cwrsync\bin\rsync.exe %* 

On Windows you can type where ssh to check if this is an issue. You will get something like this:

where ssh C:\Program Files (x86)\Git\bin\ssh.exe C:\Program Files\cwRsync\ssh.exe 
like image 92
Petah Avatar answered Sep 21 '22 13:09

Petah