Skip to content

rn7s2/rsync-win

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsync-win

rsync for Windows.

see releases page for binaries.

I had a bad time trying to find a working rsync for Windows. I read some blogs about cwRsync, but I just couldn't get it to work.

Finally, I repacked the rsync.exe, ssh.exe and cygpath.exe from Cygwin, and wrote a Rust wrapper around it.

It works for me, and I hope it works for you too.

Installation

  1. goto releases page & download rsync-win.zip
  2. extract rsync-win.zip to a directory X (e.g. C:\)
  3. add X\rsync-win to PATH (e.g. add C:\rsync-win to PATH)
    make sure rsync-win.exe is in X:\rsync-win (e.g. C:\rsync-win\rsync-win.exe)
  4. restart your terminal and use rsync-win in your powershell/cmd

Usage

  • e.g. bandwidth limit 2048 KBytes/s, -a, -v, show progress, copy from remote machine to local, exclude *.log files, and save to ./target/ directory.

    rsync-win --bwlimit=2048 -av --exclude='*.log' --progress -s <REMOTE USER>@<REMOTE_MACHINE>:<REMOTE_PATH> -d ./target/
    
  • Help

    rsync for Windows.
    Most of the options are the same as the original rsync.
    
    Usage: rsync-win.exe [OPTIONS] --src <SRC> --dest <DEST>
    
    Options:
      -i, --identity <IDENTITY>  SSH identity file [default: "C:/Users/<YOUR USER NAME>/.ssh/id_rsa"]
      -v, --verbose
      -q, --quiet
      -c, --checksum
      -a, --archive
      -r, --recursive
          --delete
          --exclude <EXCLUDE>
          --progress
          --bwlimit <BWLIMIT>
      -4, --ipv4
      -6, --ipv6
      -s, --src <SRC>
      -d, --dest <DEST>
      -h, --help                 Print help
    

some blogs: