rsync on Windows

1

I'm new to rsync and need some help with syntax or common understanding.

I have 3 servers:

  1. Source (SRC)

  2. Destination (DST)

  3. Server where rsync and ssh are installed.

I use rsync from Cygwin

Note: SRC and DST do not have rsync installed. All 3 servers run Windows 2012 R2.

My goal: I need to copy/sync folder X located on SRC e.g. C:\Program Files\X to DST at the same location.

I run this command:

rsync -a \\SRC_server\Program Files\X \\DST_server\Program Files\X

I've got the error that it failed to recognize the path.

Note: The server where rsync is installed could see and write to SRC and DST i.e. I could access and write to remote servers.

My questions:

  1. Should I install rsync and ssh to SRC and DST as well?
  2. What is wrong with the syntax of my command?

I want a simple copy/sync option and I'll optimize it later. Right now I can't even copy files from SRC to DST so I'd like to see if someone can help me get this resolved.

susik

Posted 2018-07-09T01:11:51.707

Reputation: 447

susik - Try using \\ between the file file path like C:\\Program Files\\X or else use forward slashes in place of the single backslash e.g. C:/Program Files/X... I wasn't able to get to the Server 2012 machine remotely to test the other thing for you but hopefully I'll be able to get my remote access to it re-established tomorrow and get some time to test the WSB as I told you I would. If you happen to determine that rsync solves that problem with the millions of files or whatever though, that'd be great news!! – Pimp Juice IT – 2018-07-09T03:15:57.837

For a built-in automated backup solution on Windows, you could use robocopy and Windows Task Scheduler with a batch file. (Since all of the listed servers run Windows, why shoe-horn a Linux-based solution into the mix?) – user228546 – 2018-10-11T20:51:19.497

Wouldn't robocopy be a better solution than rsync considering it's a native program and does everything required, including syncing directory content in real-time based upon an arbitrary number of changes (1 is the minimum) that can be specified? See RoboCopy /?

– JW0914 – 2019-12-23T05:45:35.597

Answers

0

Well thanks for support but our team decided to refrain from using sync. We still consider 2 options: 1. Backup/Restore using WSB or 2. Still play with tar or even zip utility But change the workflow. I think that network latency is the culprit in my case. Hence I am going to follow tar/copy/untar steps but instead of doing it remotely I will tar locally. I hope it might make the difference. Hence this rsync ticket could be closed as immaterial anymore. Thanks

susik

Posted 2018-07-09T01:11:51.707

Reputation: 447