Rsync for Windows

From KlavoWiki
Revision as of 06:31, 18 July 2009 by David (Sọ̀rọ̀ | contribs) (Created page with 'To allow you to copy data from Windows to a Linux computer using rsync. # [http://sourceforge.net/projects/sereds/files/ Download] and install the appliction. The version that ...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

To allow you to copy data from Windows to a Linux computer using rsync.

  1. Download and install the appliction. The version that was avaiable at the time I used was 3.1.0.
  2. Once the file has been downloaded and installed add the path C:\Program Files\cwRsync to your environment variable.
  3. run ssh-keygen -t rsa to generate a public key that you can copy to the Linux box that you want to use rsync with. The location of the created public key is %USERPROFILE%\.ssh\id_rsa.pub.
  4. Once the public key has been uploaded (or merged if it already exists) to the Linux file ~/.ssh/authorized_keys you will be able to copy files between the two servers without the need for authentication.

To start copying files with rsync on the Windows computer use the following command.
The following examples is copying files from C:\Data\Files to the linux box /usr/src.

rsync -avrzh --progress /cygdrive/c/Data/Files klaverst@klaverstyn.com.au:/usr/src/

If your path has spacec wrap the path with commas. EG

rsync -avrzh --progress "/cygdrive/c/Data/Files" klaverst@klaverstyn.com.au:"/usr/src/"

If you are using batch files or automated processes don't use the --progress switch.