rsync for Windows that runs with Git for Windows mingw tools
Asked Answered
C

3

11

I have been using Git for Windows on my Windows 10 box. I use bash and other command line tools that come with it. I need rsync, but found it doesn't come with this package. I googled and found a mingw flavor of rsync. When I run it, it is complaining about missing zstd dll. I suspect I am mixing a tool built for one mingw environment with other.

Where can I find rsync that runs on windows as a portable exe or a version that runs as part of Git for Windows mingw environment?

Thanks for your help!

Convoluted answered 16/3, 2023 at 4:49 Comment(4)
if using WSL (Windows Subsystem for Linux) is an option: you can install rsync using apt on your system.Sweptwing
I tried that option. These tools are needed in a virtual machine. For WSL to work, nested virtualization has to be enabled. It looks like ESXi bare metal hypervisor doesn't seem to support it. I am pushing our devops guys for it. They are coming back it is not possible.Convoluted
googling for "install rsync for windows" gave me the following blog post : How to install rsync on windows. I did not try it, so I can't say "I confirm that it works", it does look like the author was pretty methodical in his steps.Sweptwing
@Sweptwing That is what I kinda did first. The rsync.exe reported that msys-crypto-3.dll is missing. Then I followed the instructions in the link you shared. I am still getting the same error when the app is launched. That link is helpful putting everything together. My guess is the dependencies listed there became stale. I am looking for msys package that provides the crypto dll now. I expanded latest libcrypt zst from msys site. It doesn't have the dll.Convoluted
E
10

As stated in an earlier comments...

Googling for "install rsync for windows" returns the following blog post: https://ayewo.com/how-to-install-rsync-on-windows/ . But that page is out of date and does not list all the requirements for more recent versions of rsync. None of the instructions are wrong though. It is just missing instructions for 'msys-crypto-3.dll' .

'msys-crypto-3.dll' comes from the openssl package. Link to currently latest version here: https://repo.msys2.org/msys/x86_64/libopenssl-3.1.1-1-x86_64.pkg.tar.zst .

Follow the same instructions for 'openssl' as the linked blog post instructs you to do for 'libxxhash' and 'libzstd' and it will work.

Encomium answered 8/6, 2023 at 10:5 Comment(1)
incase the blog post gets taken down, these are the links for libxxhash: repo.msys2.org/msys/x86_64/… and libzstd: repo.msys2.org/msys/x86_64/…Agra
S
12

from Git Bash (run as admin)

mkdir tmp && cd tmp

install zstd unpacker for tar

curl -L https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-v1.5.5-win64.zip --output xxx
unzip xxx
cp zstd-v1.5.5-win64/zstd.exe  'c:\Program Files\Git\usr\bin\'
rm -r * .*

install rsync

curl -L https://repo.msys2.org/msys/x86_64/rsync-3.2.7-2-x86_64.pkg.tar.zst --output xxx
tar -I zstd -xvf xxx
cp usr/bin/rsync.exe 'c:\Program Files\Git\usr\bin\'
rm -r * .*

curl -L https://repo.msys2.org/msys/x86_64/libzstd-1.5.5-1-x86_64.pkg.tar.zst --output xxx
tar -I zstd -xvf xxx
cp usr/bin/msys-zstd-1.dll 'c:\Program Files\Git\usr\bin\'
rm -r * .*

curl -L https://repo.msys2.org/msys/x86_64/libxxhash-0.8.1-1-x86_64.pkg.tar.zst --output xxx
tar -I zstd -xvf xxx
cp usr/bin/msys-xxhash-0.dll 'c:\Program Files\Git\usr\bin\'
rm -r * .*

curl -L https://repo.msys2.org/msys/x86_64/liblz4-1.9.4-1-x86_64.pkg.tar.zst --output xxx
tar -I zstd -xvf xxx
cp usr/bin/msys-lz4-1.dll 'c:\Program Files\Git\usr\bin\'


curl -L https://repo.msys2.org/msys/x86_64/libopenssl-3.1.1-1-x86_64.pkg.tar.zst --output xxx
tar -I zstd -xvf xxx
cp usr/bin/msys-crypto-3.dll 'c:\Program Files\Git\usr\bin\'
cd .. && rm -r tmp
Sallysallyann answered 5/8, 2023 at 20:45 Comment(0)
E
10

As stated in an earlier comments...

Googling for "install rsync for windows" returns the following blog post: https://ayewo.com/how-to-install-rsync-on-windows/ . But that page is out of date and does not list all the requirements for more recent versions of rsync. None of the instructions are wrong though. It is just missing instructions for 'msys-crypto-3.dll' .

'msys-crypto-3.dll' comes from the openssl package. Link to currently latest version here: https://repo.msys2.org/msys/x86_64/libopenssl-3.1.1-1-x86_64.pkg.tar.zst .

Follow the same instructions for 'openssl' as the linked blog post instructs you to do for 'libxxhash' and 'libzstd' and it will work.

Encomium answered 8/6, 2023 at 10:5 Comment(1)
incase the blog post gets taken down, these are the links for libxxhash: repo.msys2.org/msys/x86_64/… and libzstd: repo.msys2.org/msys/x86_64/…Agra
O
1

The Git for Windows kit is a stripped-down MinGW environment from MSYS2. So why not just use the non-stripped-down thing? It does have an rsync package for you to install with pacman.

Do note that MSYS2, like GfW, is allergic to the concept of symlinks by default. This could mess up your sync; Google "MSYS=winsymlinks:nativestrict" for a fix.

Orchestra answered 16/3, 2023 at 20:15 Comment(1)
Good point, but the pacman, which is available within MSYS2, doesn't seem to be bundled in Git for Windows, see #32712633.Responsibility

© 2022 - 2024 — McMap. All rights reserved.