Cygwin rsync to synchronize files from Linux to Windows

If you have a lot of files (several TB) on a Linux server, and you want to synchronize them daily to a local USB disc, you can use Cygwin rsync for the job.

First you need to install Cygwin on your Windows computer: https://www.cygwin.com/

Then start up a CMD on your windows computer, and type:

rsync -avu "username@name.of.linux.server:/path/to/folder/*" "/cygdrive/e/usb-folder/"

This will connect to your Linux server with the domain name “name.of.linux.server” over SSH, and rsync folder and files under /path/to/folder folder to local Windows Drive E:\ under folder “usb-folder”

The command can be put in a .bat file, and for instance run each time you log in to your Windows client computer, for instance each morning.

If you wonder what -avu means, you can check it with: rsync –help

 

Leave a Reply

Your email address will not be published. Required fields are marked *