Solved

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

Posted on 2015-02-23
5
352 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 27

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 27

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Why frequent account locked out - Event ID 4740 6 84
RDP Trouble shooting 12 100
How to change Driver for Display 12 61
Driver Problem 12 62
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
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…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

706 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

18 Experts available now in Live!

Get 1:1 Help Now