Solved

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

Posted on 2015-02-23
5
497 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 29

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 29

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
A while back when OPSMGR 2012 was released we were very excited about getting it into our environment and upgrading our 2007 implementation,  we started our planning and we then proceeded with our implementation. All went as planned & our system …
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…
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…

856 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