Rsync and WinNT
randy.omeara at lmco.com
Sat Aug 11 02:07:00 EST 2001
"rsync --daemon ..." is not compatible with the NT/2K
service manager because it forks(). This fork() creates a
running image under a different process ID than the original
invocation. You'll have to add the --dont-fork patch (can't
recall where this is located at this time, but a search of
the archives should locate it).
In addition, there are some other issues with abortive socket
closure that may cause the sender's data to be incompletely
read by the receiver. I made several posts on this subject
within the last few months.
That said, here are the general steps I use to get rsync
to run as a daemon under the NT/2K service manager using the
resource kit's srvany command and Cygwin.
Install Daemon (on server)
in Daemon server %SYSTEM32% directory.
o Install rsync as service with Resource Kit (instsrv/srvany).
C:\> instsrv Rsync "<your-RK-location>\srvany.exe"
o Modify Target server registry.
Run regedit32 and add the following keys and values (quotation marks ARE
Edit->Add Key->Key Name: Parameters
Value Name: AppDirectory, Value: "C:\winnt\system32"
Value Name: Application, Value: "C:\winnt\system32\rsync.exe"
Value Name: AppParameters, Value:
--verbose -stats --config="C:\winnt\system32\rsyncd.conf" --daemon
o Use Control Panel->Services->Rsync to set Logon Account, Description,
Recovery, and Startup Type:
Logon As: <pcvm admin account/password>
Description: Manages Content Sync (rsync.samba.org)
Startup type: Automatic
First Failure: Restart the Service
Second Failure: Restart the Service
Subsequent Failures: Take No Action (could be notification/batch/trap
Reset fail count after: 0 days
Restart service after: 1 minutes
o Use Control Panel->Services to start the Rsync service
(Note that you should now view startup status and errors for rsync in the
Application Event Log unless you have specified a separate log file in
More information about the rsync