dhtmldude wrote:
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),
using ssh!)).
C:\CMS\PageGenerator>rsync -avc --delete -vvvvv \
-e "ssh.exe -i C:\cms\PageGenerator\qa_rsa" \
\\cagecfsu1.saifg.rbc.com\YCM0\InternalCache\test_aug17 \
nasad...@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.
'test_aug17/test_aug17'.
----------------------
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
(likely C:\cygwin)
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:
/
/usr/bin
/usr/lib
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:
'chdir C:\cygwin\bin'
to
'chdir C:\bin'
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" \
//cagecfsu1.saifg.rbc.com/YCM0/InternalCache/test_aug17 \
nasad...@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....)
Linda
----------------------------------------------
Other Simplifications for cygwin under Windows)
----------------------------------------------
Get util 'linkd' from the MS Windows Resource Kit (Win2k, WinXP,
Win2k3), free downloads from one of the MS websites (maybe technet) MS
website). The util will be under the 'cmd' dir.
Create a hard link to it in your path (you'll want to keep it around --
it's useful). If you have a ~/bin dir, then (in bash):
"ln '<linkd-path>' ~/bin/. "
I'd do the same, or instead of, (I have it in both places for
convenience and safety), in the /Windows/System32 dir, so:
'ln <linkd-location> /Windows/System32/.'
Under the 'cmd' dir. Then try these on for size/comfort: 1) (in c:\
(or / in cygwin)) i make sure there is no existing dir named 'Prog',
then type 'linkd Prog /"Program Files". Notice -- you can now access
/Program Files via name /Prog. It will remain that way until you delete
the link ('linkd /Prog /D')
2) If you would like it, (and I do, or I wouldn't be suggesting it),
instead of having your cygwin home dir in '/home/<user>' be
_separate_ from your windows user home dir of '/Documents and Settings',
make them the same! I.e.:
cd /; mv /home /home- # (you may need to make sure all progs are
# closed, and use /bin/ash for your shell
# when you do it: 'cygstart /bin/ash' to start
# in a separate window)
linkd /home '/Documents and Settings'
# Now, if you know you don't have any dir or file conflicts you can
# just move the old files into the new dir:
mv /home-/. /home/.
# to be safer, this should work:
rsync -aHAXv --fake-super \
--ignore-existing --remove-source-files /home-/. /home/
# then see what is left in your old /home- dir and resolve any conflicts
If your Documents dir still is 'My Documents', (Carryover from earlier
OS's), use linkd or a softlink to be able to use the shorter name. You
can try a rename under Explorer -- if it lets you rename it (it's
a System Dir), then it should update the registry entries for you).
If you want to be braver and don't mind a bit of work, you can use
'mv' in bash to rename it and then go through the registry (search) and
find references to the old name (My Documents) and change it to the new
name(Documents). If you find a *bunch* of renames that are needed,
always remember you can dump a section of the registry to a file (if you
use the win version of Gvim/Vim, it can edit UTF-8 or UCS-2 naturally,
so saving in Regedit5 format is best, but I've done it in Regedit4 --
before Gvim had Unicode support. But save to a file then use the editor
and :%s/My Documents/Documents/g, then write the file out and use:
"reg /import filename.reg" to read it back in. Remember, editing
the registry can mess things up...make backups...
You can backup the main keys:
HKLM/HARDWARE
HKLM/SOFTWARE
HKLM/SYSTEM
(or you can group them together just using HKLM, but they
are actually separate files on disk -- all just logically mounted
in the registry namespace).
HCU (which is actually 2 keys, but not worth separating).
using 'reg SAVE <KEYNAME> KEYNAME-YYYYMMDD.hiv'
(I'm suggesting the file's name so you can remember it. If you have
a key with a '/' in it, you could use '-' or the unlikely char of '!'
(though you'd have to quote it)).
--------------------------
SSH.EXE key specific notes)
--------------------------
Note: for 'ssh.exe's key location, I left off '/cms/PageGenerator/'
from the keyname, as it in the above case, it appears you are already
in the '/cms/PageGenerator' subdirectory.
If you use 'ssh', exclusively, to xfer files, you might want to
set "RSYNC_RSH='/usr/bin/ssh'" in your cygwin environment (add it
to you .bashrc). If you use 'qa_rsa' as a key, "alot", you can
add it to your ~/.ssh/config in one of several ways.
1) if it is your private key, copy it to your .ssh/ dir and just
add the line:
IdentityFile =~/.ssh/qa_rsa
2) if it needs to remain where it is, then just specify the full
pathname in the line above.
3) to be efficient, if you only use it with host 10.243.101.214, then
add it as a Host section in your .ssh/config file:
Host = 10.243.101.218
ForwardX11 = no
IdentityFile = ~/.ssh/qa_rsa #(or '= /cms/PageGenerator/qa_rsa')
then your rsync line gets rid of the "-e" altogether.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html