Solved

How to create an Rsync Windows Service in Cygwin on Windows Server 2012 R2

Posted on 2015-02-23
5
439 Views
Last Modified: 2015-03-10
I have installed the latest Cygwin with just Rsync and its dependencies.  I need to have Rsync running as a Windows Service on the Server now.  I can't see to find the way to do this on the Internet.  Please help./
0
Comment
Question by:racone
  • 2
  • 2
5 Comments
 
LVL 28

Expert Comment

by:serialband
ID: 40628301
Just use the standard linux instructions for rsync.

rsync -a Source Destination

If you want to zip up the stream:
rsync -za Source Destination

You should be able to schedule it.

If you want to do it the linux way you can use cygwin's cron.

0 0 * * * rsync -a Source Destination


http://www.trueblade.com/knowledge/using-rsync-and-cygwin-to-sync-files-from-a-linux-server-to-a-windows-notebook-pc
http://www.kossboss.com/rsync-windows-scheduled-backups

It's been a long while since I've run cygwin.  Is there a specific reason to use that over robocopy.exe, the windows equivalent?  You would be better able to keep Windows ACLs with robocopy.
0
 
LVL 1

Author Comment

by:racone
ID: 40628352
This doesn't really answer my question.  Anyone else?
0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 40628635
You can use cygrunsrv try looking at http://wiki.dirvish.org/CygwinRsync

Or go to https://cygwin.com/ml/cygwin/2006-06/msg00655.html  and search on "RSYNC:"
0
 
LVL 28

Expert Comment

by:serialband
ID: 40628772
That drivish.org information will work, but it's quite obsolete.

It doesn't really make too much sense to run rsync as a service on Windows.  You haven't fully explained what exactly it is you're trying to do.

rsync is usually placed in cron.  The rsync service usually runs on linux and that's just to maintain rsync ports, which you don't really need anymore when you have sshd running.  Modern Linux rsync uses ssh for transfers now.  You really don't run unencrypted rsync services anymore.  You should install sshd as a service in your cygwin.

If you're copying from Windows to Windows, you should use robocopy, not rsync.  It does the same thing as rsync, but it's specifically for Windows.  If you're copying from Linux to Windows, it's easier to use SAMBA shares and mount them on linux and run rsync there, or run sshd on Windows and rsync from linux.  If your data has ACLs you need to run the correct tools on the correct platform to keep them.
0
 
LVL 1

Author Closing Comment

by:racone
ID: 40656821
This was an excellent solution  Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I wrote an article (http://www.experts-exchange.com/articles/2245/Anti-rootkit-software.html) some time ago with a reference to nLite  (http://www.nliteos.com/)slipstreaming software.  I recently changed that link to point to NTLite (https://www.ntl…
In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
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…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now