rsync: connection unexpectedly closed
rsync at tlinx.org
Tue Aug 18 15:35:47 MDT 2009
> I'm using Rsync 3.1.0 and VanDyke VShell for SSH.
Is there a reason why you are using the VD VS when you likely have
cygwin's 'ssh' built in as well? Cygwin's ssh was ~20-30% faster than
VD's technology (I benched it against their VSH/VCP tools in their
SecCRT package, which I use regularly (great package Win->*nix remote
ssh tool, especially compared to a bash-shell window (CMD.EXE Window),
> C:\CMS\PageGenerator>rsync -avc --delete -vvvvv \
> -e "ssh.exe -i C:\cms\PageGenerator\qa_rsa" \
> \\cagecfsu1.saifg.rbc.com\YCM0\InternalCache\test_aug17 \
> nasadmin at 10.243.101.218:/cygdrive/g/EWCMS_SYNC/test_aug17/
Quote & Path Probs:
You might want to try single instead of double quotes.
Arguments (even if you fix the backslash prob). Using Dos file
syntax is normally a headache with POSIX compatible utils (sometimes
even if you do use single quotes -- they'll still reprocess it as
a string internally, depending on the command/prog). Also, I think you
may have an extra '/' at the end of your target (unless you want a
copy of 'test_aug17' in your targetdir of 'test_aug17', i.e.
Suggestion to simplify)
1. I believe part of the problem stems from your intermixing
a POSIX based util (rsync), w/ Win progs (VD's VS-ssh).
2. Another part is using the default (suggested) cygwin install
values. If you use straight cygwin, with the correct paths for your
key, you'll not have these problems.
To simplify your path management, I'd suggest:
Install Cygwin to '/', NOT '/Cygwin', as the Corporate, RedHat-based
'setup.exe' "suggests". Used to be half or more of the developers did
that and personally I've done it since I switch from a linux to
Win+cygwin desktop (late 2001). I haven't moved my cygwin dir in
quite a while, so I'm really reaching more from logic than memory, but
this should be the easiest (fastest) way (presuming you
are using a current released version of cygwin and not a beta, which
no longer uses the registry mounts).
a. Get out of cygwin. Go into explorer and open two windows:
one viewing your root drive (C:\), and one viewing your cygwin dir
b. Select all under \cygwin (shouldn't be much other than directories,
if hygiene has been maintained; :-)), then drag-n-drop to
the C:\ explorer window.
c. Fix Cygwin mount paths: bring up regedit.exe, and navigate to:
'HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2'.
There, you'll see keys for your cygwin mounts. Default is:
Under each, key, you'll see a REG_SZ value called 'native'
that maps to the real location of each of your cygwin mapped
drives. In a default installation, the above would say:
'C:\cygwin' 'C:\cygwin/bin' and 'C:\cygwin/lib' (respectively)
Change those to: 'C:\' 'C:\/bin' and 'C:\lib'.
d. Fix Cygwin.bat in 'C:\'. Edit with Editor of choice:
Change the line where it says:
e. Cross fingers. (that should be it, but haven't moved my
cygwin install for ~8 years).
The reason this isn't suggested by default is, that RedHat, Cygwin's
owner, is a competitor (in a way) of MS. It's providing an MS 'app'
environment to enable application compat with linux -- they need to
follow the window's standard application advice to avoid MS creating
overt problems for them. MS could decide they wanted to convert to *nix
compatible top-level dir names (/bin instead of /prog, or /opt for 3rd
party apps, or /home for user home dirs, or /lib for libraries instead
of putting them all over the place....etc) ... (when pigs fly). But
no reason for an application vendor (and competitor) to create problems
for themselves should MS suddenly decide to go that route. ;-)
However, it is well known that MS ignores users, so we are generally safe
doing such things. :-)
Once you have this fixed, then set 'cygdrive prefix' to '/' (instead
of default '/cygdrive': (At Bash prompt, 'mount -c /').
Now your cygpaths will be the same as your winpaths.
Some programs/utils (example: Win-version of vim & gvim) are even smart
enough to accept, either, '/' or '\', as a dir-sep character.
With those changes in place, your complex line above becomes:
/CMS/PageGenerator> rsync -avc --delete -e "ssh.exe -i qa_rsa" \
nasadmin at 10.243.101.218:/g/EWCMS_SYNC/
(presumes you've changed target sys's cygdrive prefix to '/').
Alot less messy, eh?
Rest of my way too long document (this was only about the 1st third of
it), I'll stick in an attachment, so those those not wanting to view
extraneous material will, of course, have auto-attachment view turned
off, and not see it unless they choose to...:-)
Hey, tangent went to tangent, went to tangent -- and I never even got
my email idea concerning rsync formulated...just saw the problem and
went off...way too much caffeine this morning...(or lack of sleep last
night, or both....)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the rsync