RSYNC as daemon on windows
A short tutorial on how to run the RSYNC backup software tool as daemon
on windows. A sample rsyncd.conf is provided, how to password protect it,
and how to run it.
On Windows: All files in z:\rsync:
rsyncd.conf
use chroot = no
strict modes = false
[backup]
path = /cygdrive/z/rsync/backup
read only = no
comment = backup area
[secret]
path = /cygdrive/z/rsync/secret
comment = TEST
read only = no
auth users = user
secrets file = /cygdrive/z/rsync/rsyncd.secrets.txt
rsyncd.secrets.txt
user:password
(NOTE the extra line at the end of the file!!!)
Now you can start the RSYNC daemon on windows with:
rsync2.5.1-dev.exe "--daemon" "--config=rsyncd.conf"
Backup from a linux machine to the windows machine:
# rsync -av "/home/captain/" 192.168.0.151::backup
-or-
# rsync -av "/home/captain/" captain@192.168.0.151::secret
192.168.0.151 = windows backup machine
/home/captain/ = directory on linux to backup
TROUBLESHOOTING:
"strict modes = false" in rsyncd.conf: very important on windows, otherwise you get this:
# rsync -avv "/home/captain/" captain@192.168.0.151::secret
opening tcp connection to 192.168.0.151 port 873
Password:
@ERROR: auth failed on module secret
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(515)
From the manual:
strict modes
The "strict modes" option determines whether or not the permissions on the
secrets file will be checked. If "strict modes" is true, then the secrets
file must not be readable by any user ID other than the one that the rsync
daemon is running under. If "strict modes" is false, the check is not
performed. The default is true. This option was added to accommodate rsync
running on the Windows operating system.
Last-Modified: Sat, 11 Mar 2006 21:08:40 GMT