Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2015-02-23
5
Medium Priority
?
982 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 31

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 2000 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 31

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
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…
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…

926 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