-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rsync support #1266
Comments
Unfortunately, this is not in this project's scope. I guess however that you could leverage posix library that is part of this project to create a native port of rsync for Windows. |
Thanks for the prompt answer. Yes, I also guessed that rsync support could have not been in the scope of the project. I just hoped that Microsoft wanted to support it since it's extremely useful use case. |
First of all thankyou for your post about extracting files from msys2. It works great as an rsync server with Win32-OpenSSH. Did you see the old msvcrt port of rsync? Perhaps that could be used for some ideas when reworking with the new libraries. |
For me, this worked as a work-around: http://www.mls-software.com/opensshd.html It's also cygwin based, but it's smaller and intstalls only needed dependncies. E.g.: $ssh = "C:\Program Files\OpenSSH\bin\ssh.exe"
$rsync = "C:\Program Files\OpenSSH\bin\rsync.exe"
$sshkeyscan = "C:\Program Files\OpenSSH\bin\ssh-keyscan.exe"
...
"Copying configuration scripts to $master..." | Write-Host
. $rsync -e "'$ssh'" -r ../scripts "$($master):" | Write-Host
|
@maertendMSFT can you comment how this was resolved please? |
It's out of scope for this project. |
Hello, first of all thank's for the Project. |
It is true that from remote win to unix
from local powershell win to unix
The other two combinations are left as an exercise for the reader. Note that the options passed after are use-case specific, but for reference mine were |
OpenSSH for Windows version
7.7.2.0 (both on client and server)
Server Operating System
Windows Server 2016 Datacenter 1607 14393.2515
Client Operating System
Windows 10 Pro 1803 17134.320
What is failing
One of the most useful use cases when using ssh transport is rsync file synchronization. rysnc is unfortunately one of the very useful utilities that didn't receive a native Win32 port, only cygwin/msys2 ports. These are self-contained in only 3 files:
I attached the cygwin port here for convenience, but the files can be easily stripped from a cygwin or msys2 installation:
rsync-cygwin.zip
Rsync must be present on both client and server to allow file synchronization. Maybe unsurprisingly the cygwin/msys2 port of rsync doesn't work together Win32-OpenSSH on client side, but works very well on the server side, making it very interesting experiment!
Expected output
NOTE1: a cygwin/msys2 port of OpenSSH must be installed on client side!
NOTE2: a cygwin/msys2 port of rsync must be present on server side and visible in PATH!
The following works correctly client side when launched inside cygwin shell using cygwin OpenSSH port:
Obviously having cygwin installed you can achieve the same from a regular command prompt:
Actual output
NOTE: Win32-OpenSSH ssh.exe must be present on PATH
Forcing cygwin/msys2 port of rsync to use Win32-OpenSSH results in the following errors:
My guess is that this is happening because IPC communication between cygwin rsync and Win32-OpenSSH is not compatible. Questions:
The text was updated successfully, but these errors were encountered: