Install Rsync Windows 10/11

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

  1. 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.
1
scoop install git

Install Pacman

  1. Download pacman, pacman-mirrors, msys2-keyring & gcc-libs from the MSYS2 website. Figure 1

  2. 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

12
Figure 2Figure 3

Figure 4

  1. 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!

  1. 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 | while read p v; do
  d=/var/lib/pacman/local/$p-$v
  mkdir -p $d
  for f in desc files install mtree; do
    echo "$URL$d/$f" ..... $d/$f
    curl -sSL "$URL$d/$f" -o $d/$f
  done
done

Figure 5

Install Rsync

  1. Once pacman is installed on Git Bash, rsync can be installed:
1
pacman -S rsync
12
Figure 6Figure 7
  1. 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.
1
rsync -avzh --progress --stats /D/Path/To/File.txt /Z/Path/To/Paste/
12
Figure 8Figure 9

Source

  1. https://gist.github.com/rafaelpadovezi/
  2. https://gist.github.com/rafaelpadovezi/#gistcomment-4325219
Bantu bagikan halaman ini ke:
Built with Hugo
Theme Stack designed by Jimmy