Rsync is a utility for efficiently transferring and synchronizing files between a computer and a storage drive and across networked computers by comparing the modification times and sizes of files. It is commonly found on Unix-like operating systems and is under the GPL-3.0-or-later license.
Since we’re using the Windows operating system, we need another tool called Git for Windows. Git GUI using bash shell by default, but before that, we need to add a repository first and in this tutorial we can use MSYS2 repository, install pacman (Arch default package manager) and install rsync with pacman.
Install Git for Windows
Install Git for Windows according to the operating system you are using whether 32/64 bit, if you are using scoop, you can use command.
The files are in zst format. To extract to tar format, you can use Windows version of zstd, for users who use scoop You can use the command scoop install zstd for installing zstd.
Once the zstd is installed, run the following command from git GUI/PowerShell zstd -d *.zst after successfully extract will appear 4 new files with tar format
1
2
Now, we open the Git GUI and run the command below to extract the tar file into the Git GUI root directory.
1
2
3
4
5
6
7
8
cd /
tar -xvf /D/Downloads/msys2-keyring-1~20230316-1-any.pkg.tar
tar -xvf /D/Downloads/pacman-mirrors-20221016-1-any.pkg.tar
tar -xvf /D/Downloads/pacman-6.0.2-4-x86_64.pkg.tar
tar -xvf /D/Downloads/gcc-libs-11.3.0-3-x86_64.pkg.tar
pacman-key --init
pacman-key --populate msys2
pacman -Syu
Make sure the PATH for the tar file is correct!
To synchronize metadata files, you need to run the command below. This step may take a few minutes to complete, depending on your internet speed, too.
1
2
3
4
5
6
7
8
9
URL=https://github.com/git-for-windows/git-sdk-64/raw/main
cat /etc/package-versions.txt |whileread p v;dod=/var/lib/pacman/local/$p-$v mkdir -p $dfor f in desc files install mtree;doecho"$URL$d/$f" ..... $d/$f curl -sSL "$URL$d/$f" -o $d/$fdonedone
Install Rsync
Once pacman is installed on Git Bash, rsync can be installed:
1
pacman -S rsync
1
2
If everything goes well and works properly, you can use the command rsync, The command same as command in the Linux operating system. For example, if you want to copy a file from drive D to drive Z with progress and stats, you can use these command.