[wplug] cygwin rsync

James O'Kane jo2y at midnightlinux.com
Thu Jul 8 01:43:00 EDT 2010


On Wed, Jul 7, 2010 at 11:37 AM, Arnaud <lists at arnaudloos.com> wrote:
> Hello all. I'm initiating an rsync connection under cygwin from a Windows
> box in order to mirror some directories to a Linux workstation. The command
> I'm issuing is:
> rsync -rltDhvz --progress -e 'ssh -p 2211' --delete <local source> <remote
> destination>
>
> My problem is that in order to run my complete copy operation I need to run
> the above command five times with different source and destination
> directories. As it stands now I have to run the five commands separately and
> authenticate 5 times. I'm looking to script this process but I need a way to
> essentially establish the ssh connection, authenticate once, and then have
> the script run all 5 rsync commands in sequence. Any advice on the best way
> to achieve this goal. Remember that I'm working within the constraints of
> cygwin. I'm thinking perhaps I can establish the tunnel beforehand in cygwin
> but then how do I ensure that the rsync operations will utilize that tunnel?

This would work in linux, but I don't have a full cygwin install setup to test.
http://en.wikipedia.org/wiki/Ssh-agent
http://mah.everybody.org/docs/ssh

The reverse works to let me ssh into my windows machine, so I think it
should work in the direction you want.
If you want to try initiating the connection from the linux side, this
is the documentation I was using. It was written from the perspective
of dirvish, but you can ignore the parts specific to that.
http://wiki.dirvish.com/index.cgi?VistaRecipe

-james


More information about the wplug mailing list