File Synchronization Using rsync on Windows Platform

  


rsync is a good file synchronization tool. We need a server and a client. You can synchronize the local

file to the server, or you can synchronize the server's files to the local.

1. http://rsync.samba.org/Download the cwRsync client (cwRsync) and the server (cwRsyncServer).

2, the server side (assuming the IP address is: 192.168.1.100) Installation: Install with the default options.

After installation, the service defaults to manual startup mode. In the “Administrative Tools/Service Management”, start the “RsyncServer” service and modify “RsyncServer” as the automatic startup mode.

3, server-side configuration: edit the rsyncd.conf file, write the following information:

The following is the code snippet:

uid = 0

gid = 0 #You must add these lines when transferring anonymously.

use chroot = false

strict modes = false

hosts allow = *

log File = rsyncd.log

# Module definitions

# Remember cygwin naming conventions : c:\\work becomes /cygwin/c/work

#

[test]

path = /cygdrive/d/temp #Specify the file that the server uses to synchronize. This means "d:\\temp";

read only = false

transfer logging = yes

Description: where [test] is the module definition to be synchronized, multiple modules can be defined, path is the disk path, /cygdrive/d/temp corresponds to d:\\temp Folder, because cwRsync software can not directly mount the drive letter under windows, use /cygdrive/this mode.

4, install the client on another machine (assuming the IP address is: 192.168.1.101), in the command line mode, enter the bin folder of the installation directory, execute: rsync -avr 192.168.1.100 ::test /cygdrive/d/temp, so that the server's files can be synchronized to the local.

Copyright © Windows knowledge All Rights Reserved