Installing RSYNC on Windows 2000\NT.
With thanks to "Mike McHenry" who wrote the original "Rsync on NT" document.
This document assumes that you want to install rsync as a daemon on a Windows 2000 server, without installing the entire cygwin suite.
You will need the following files:
From Cygwin:
- cygpopt-0.dll
- cygwin1.dll
- rsync.exe
These are available from http://www.cygwin.com
A zip file containing the three files you need is available here.
From the Windows NT or 2000 Resource Kit.
- instsrv.exe
- srvany.exe
These are available from Microsoft through TechNet subscription or equivalent (MSDN, Select.)
If you follow the following instructions you will an rsync service on your windows machine, running one large WORLD WRITEABLE area.
Please be careful where you place the server as any one who can see it can read or write to this volume.
- Place rsync where you want to run it from.
(I usually use C:\program files\rsync)
- Put the two dll's anywhere in the path, usually C:\winnt\system32.
- From a shell running in the directory containing instsrv and srvany type:
(Replace C:\DirectoryContaining\ as appropriate)
instsrv Rsync "C:\DirectoryContaining\srvany.exe"
- You should now have a new service called Rsync and you can verify by
looking in Start->Control Panel->Services
DON'T START IT YET!
- If you want to run rsync in daemon mode you will need a configuration
file. Here is the one I use, call it rsyncd.conf and place it in the same
directory as rsync
(C:\Program files\rsync\rsyncd.conf)
use chroot = false
strict modes = false
hosts allow = *
[BackupArea]
path = C:\rsync\
read only = no
This example configuration will allow anyone to use rsync to write to C:\rsync.
(The command line would look somthing like "rsync -avz server::BackupArea", where server is the name of the server running the rsync daemon.)
The first two lines are important for rsync to work on Windows.
- You are going to need to hack some keys in the registry to make it work.
Don't do this unless you are comfortable with the changes! Run regedit32 and
add the following keys and values (quotation marks ARE IMPORTANT):
HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->Services->Rsync
Edit->Add Key-> Key Name: Parameters
Edit->Add Value-> Value Name: AppDirectory Value: "C:\Program Files\rsync"
Edit->Add Value-> Value Name: Application Value: "C:\Program Files\rsync\rsync.exe"
Edit->Add Value-> Value Name: AppParameters Value: --config="C:\Program Files\rsync\rsyncd.conf" --daemon
If you would like to add these keys automatically, download this reg file and run it to merge it into your registry: rsync-param.reg
Remember, unless you trust me implicitly, read the reg file and make sure you understand what it's doing before you run it, I will not be held responsible for idiots.
- That's it, you should be able to start and stop the rsync service at will
using the Services Control Panel. When running with the above configuration
you should be able to test by attempting to telnet to port 873 from a remote
machine.
telnet rsync.server.com 873 (replacing rsync.server.com with your own
server's address)
You should get a connection to the rsync daemon running on your NT box.
I would love to hear from anyone who has any sucess with these instructions my email address is tiarnan--at--phlegethon.org.
I'm afraid I know next to nothing about rsync but if I can I'll try and give you a hand.