Windows Rsync

From GLMWiki
Revision as of 14:40, 24 January 2012 by John (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Install Cygwin and Linux programs under Cygwin

You can download it from here. Even if you already have Cygwin, download the setup.exe file in order to install some programs to run under Cygwin.Once you start the “setup.exe” for Cygwin and follow some directions given in that setup program, you will eventually come to a section where you can select and install some Linux (Unix) programs. See the screenshot below.

       install the “rsync” program under “net“.
       Also install cybrunsrv, which is under Admin.

put config files in c:/cygwin

Next, set up the rsync job as a service to be started at boot-up.

Click on Start --> Run type 'cmd' and press enter. In the terminal, cd \cygwin\bin

Then, cygrunsrv.exe -I rsyncd -e CYGWIN=nontsec -p c:/cygwin/bin/rsync.exe -a "--config=c:/cygwin/rsyncd.conf --daemon --no-detach"

*the second command is a long one liner. You must issue these commands without any misspelling.

  To test to see if the above command was properly issued,

Go to Control Panel --> Administrative Tools --> Services Find 'rsync' and click on 'start' to see if the service starts properly.

Open a Port

Finally, open a port for rsync in the firewall. Control Panel --> Firewall --> Exceptions

   	Name: rsyncd
   	Port number: 873
   	Type: TCP 

Add stop script to system shut down.

hold windows key and press R type mmc hit enter click file->add snap in add group policy snap in go to local computer policy->Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)


In the details pane, double-click Shutdown.


In the Shutdown Properties dialog box, click Add.


In the Add a Script dialog box, type the following information, and then click OK:

Script Name: sc

Script Parameters: stop rsyncd


In the Shutdown Properties dialog box, specify the options that you want, as follows, and then click OK: