Using rsync on Windows
Introduction
This guide shows you how to set up rsync
on a Windows system by leveraging Git Bash from Git for Windows.rsync
is a powerful file synchronization tool commonly used on Linux, but it can also work on Windows with a few manual steps.
No need to install WSL or Cygwin - just follow this lightweight and portable method.
Step 1: Install Git for Windows (Includes Git Bash)
Download Git for Windows from the official website or directly from this link: Git 64-bit installer (v2.49.0).
Alternatively, you can install it using the Windows Package Manager:
1
$ winget install -e --id Git.Git
After installation, you’ll have access to Git Bash, which provides a Unix-like terminal for running Linux-style commands like rsync
.
Step 2: Download rsync
Binary for Windows
Visit the MSYS2 repository at: https://repo.msys2.org/msys/x86_64/.
Download the latest version of
rsync
(e.g.,rsync-*.pkg.tar.zst
).Use a tool like 7-Zip to extract the
.tar.zst
file. Inside, you’ll findrsync.exe
.Copy
rsync.exe
into the Git Bash binary folderC:\Program Files\Git\usr\bin
.
We place rsync.exe
in C:\Program Files\Git\usr\bin
so that it’s available in the Git Bash environment’s PATH.
Step 3: (Optional) Download Dependency Libraries
If rsync.exe
doesn’t run due to missing DLL files, download these common dependencies from the same MSYS2 repo:
libopenssl
libxxhash
libzstd
These libraries are required because rsync.exe
is dynamically linked and needs them to run.
Look for
.pkg.tar.zst
files, extract them, and copy their contents (usually inside ausr
folder) into:C:\Program Files\Git\usr
If required DLLs are missing, you’ll see an error message similar to the one below:
Step 4: Verify Installation
Open Git Bash or Windows Terminal.
Type the following to check if
rsync
works:1
$ rsync --version
If the version info is displayed, you’ve successfully installed rsync
on Windows!
Tips for Beginners
- This setup runs
rsync
inside Git Bash, which mimics a Linux shell. - Make sure to extract the right files - you need the actual
rsync.exe
and any required.dll
files. - If
rsync
doesn’t start, open Git Bash and try running it from there. You may also check for missing dependencies.