Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync from linux to windows without smb mount

I would like to use rsync to mirror a git repo from a linux machine to several Windows servers. What I'm seeing online so far are solutions that require you mount the Windows side using samba. ideally I would like to avoid that because it would require managing several mounts, not to mention security concerns. I've verified that I can at least ssh onto my test server. I have cwRsync installed on the windows server. I try the following command, but rsync doesn't seem to like the space in the path to the rsync executable.

rsync -rlH --rsync-path="c:/Program\ Files/cwRsync/bin/rsync.exe" . Administrator@cool03-stage:d:/rsync_test/.
'c:/Program\' is not recognized as an internal or external command,
operable program or batch file.
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
like image 217
numb3rs1x Avatar asked Nov 01 '22 16:11

numb3rs1x


1 Answers

After adding C:\Program Files\cwRsync\bin to my PATH on the Windows server, I can run this:

rsync -rlH -e ssh . Administrator@cool03-stage:/cygdrive/d/rsync_test/.

Seems to work.

like image 110
numb3rs1x Avatar answered Dec 14 '22 09:12

numb3rs1x