Rsync on Windows

Posted on 2014-07-22
Last Modified: 2014-08-04
I am trying to figure out how to run rsync between a Linux server and a Windows desktop. The Linux server is an Amazon EC2 server.

Can anyone guide me or help me with the programming?

Question by:Allen Ashkenazi
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +2
LVL 21

Expert Comment

ID: 40212229
There is no rsync for Windows as rsync builds on top of ssh protocol stack.

Can you use pscp instead?
LVL 12

Expert Comment

by:Kent W
ID: 40212350
The only way you can use rsync is if you make a share on Windows (SMB or NFS), and mount it from your linux machine.
Then, linux can see the files system, and you can rsync to your hearts content.

But, as Mazdajai said, the closest thing to rsync for Windows is robocopy.
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40212602
There is a Windows port rsync available on (not tested by me) - personally I'd just use WinSCP to get a copy of your Linux server (the folders you need) to your Windows machine. Or even easier: install a Linux guest in VMware player and use native rsync in the virtual to get your files.
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

LVL 29

Expert Comment

ID: 40212661
Install cwrsync and you can rsync from Windows.

You can also install cygwin on windows and have rsynce and the full linux experience on your windows system.

Author Comment

by:Allen Ashkenazi
ID: 40212709
This is above my capability.

I have a MobileVue project that I am looking for a developer to do since I am not technical enough
LVL 12

Expert Comment

by:Kent W
ID: 40212728
Where is your Windows box in relation to the Linux EC2 instance?

Author Comment

by:Allen Ashkenazi
ID: 40212745
Internet. I have several Windows Desktops that need this service.
LVL 12

Expert Comment

by:Kent W
ID: 40212831
It may help to explain what you are trying to do.  Sync what type of files from which OS to which OS?

Being non-technical, the only way you are going to get rsync to do this job is to mount your windows FROM your Linux ECT other words, it will have to run over Samba (SMB, or as you probably know it "Shared folders" via Windows file sharing).  Alternately, you can mount the Linux box from your Windows, and use robocopy or any of the other windows tools mentioned previously.
But, there are quite a few ways to accomplish this.  Which makes sense depends on the direction and schedule, if any.

To guide you, I would need to know which direction you are syncing files.  Copying from Win to Linux, or Linux to win?
Does it have to be an automated process, or do you just need the ability to drop some files when you want?
LVL 29

Expert Comment

ID: 40212892
It will probably be easiest if you use winSCP.  It's a GUI interface that uses SSH.  You just have to enter your ssh password and you can drag and drop the files.

If you care about keeping the date and time better synchronized and not having to copy all the file if they haven't changed, then use DeltaCopy (a windows rsync GUI)

Everything else is more involved.

The next simplest is probably to install putty, or just unzip the putty package and do the pscp command line.  cwrsync would be about the same too.  You don't have to configure anything, but you'll need to understand command line syntax.

To copy from the remote system to your local system.
C:\PATH_TO_PUTTY\pscp.exe -pr EC2_account@EC2_server:PATH_TO_FILES  C:\PATH
C:\PATH_TO_PUTTY\pscp.exe -pr EC2_account@EC2_server:PATH_TO_FILES  D:\PATH

You can also go the other way.
C:\PATH_TO_PUTTY\pscp.exe -pr D:\PATH  EC2_account@EC2_server:PATH_TO_FILES  

Setting up SAMBA requires that you install it on your EC2 Linux system and configuring it.  Then you need to mount it from your Windows box.  That's a bit more involved.

Author Comment

by:Allen Ashkenazi
ID: 40213039
serialband, I think your original approach is probably the best approach.

I have a server -- Linux or could be Windows,-- that I have full control of. The server has a website with several 1000 static pages -- that gets updated monthly.  Users running Windows desktops connect to the server via the internet and get their updated copy of the website on their Windows desktops updated by clicking on the update button in an application. Given that rsync works on a delta basis -- difference between file and file 2 applied to file 2 -- it is probably the fastest.

My deliverable to the customer is an exe that installs on each user's Windows desktop.

Does this all make sense to you? If not, we should talk.
LVL 29

Accepted Solution

serialband earned 500 total points
ID: 40217740
If they have ssh access, they should already have access to their account home directories.  They should be able to use WinSCP or DeltaCopy to connect and then Drag and drop items.  When they log in, they should be set to view their home directories.  You don't need any special installs.  The default WinSCP or Delta Copy should work for them without modification.  They only need to know how to enter their username and password or passphrase.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't Login to Laptop 18 46
Windows 2016 Server and Updates 5 42
Windows 7 - How to Extend Hard Drive Boot Partition 12 58
Golang on CentOS / Fedora 2 8
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Fine Tune your automatic Updates for Ubuntu / Debian
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question