Rsync is a data image backup tool in unix-like systems. It can be seen from the software name-remote sync. We have already introduced the Linux system as the server. Today we will introduce how to deploy rsync on Windows.
Rsync for Automatic Data Synchronization in Linux
I. Test Environment
Server: Windows 2003 (192.168.1.61)
Client 1: Linux CentOS 6.0 (192.168.1.70)
Client 2: Windows 7 (192.168.1.62)
--------------------------------------------------------------------------------
Ii. install and configure rsync
2.1 Download cwRsyncServer_4.0.5_Installer
:
--------------------------------------------------------------------------------
2.2 install cwRsyncServer
Click "NEXT" to install cwrsyncserver_4.0.5_installer.exe;
--------------------------------------------------------------------------------
2.3 configure cwRsyncServer
Go to the default installation directory: C: \ Program Files \ ICW;
Use the Notepad program to open the rsyncd. conf file. The edit content is as follows:
Uid = 0
Gid = 0
Use chroot = false
Strict modes = false
Hosts allow = *
Log file = rsyncd. log
# Module definitions
# Remember cygwin naming conventions: c: \ work becomes/cygwin/c/work
#
[Webtest]
Path =/cygdrive/c/web/test
Read only = true
Hosts allow = 192.168.1.70, 192.168.1.62
Auth users = bakweb
Secrets file =/etc/rsyncd. pw
Transfer logging = yes
Go to the etc directory and create a new file named rsyncd. pw. The editing content is as follows:
Bakweb: 00123456
Go to drive c, create a new directory and subdirectory named after web and test, and grant all the permissions of the SvcCWRSYNC user to the test folder, for example:
Go to the test folder, create Several folders and files, or copy some files from other places for synchronization testing;
--------------------------------------------------------------------------------
2.4 start the rsync Service
Go to my computer-right-click Management-services and applications-services-find RsyncServer-double-click to open RsyncServer service-change the General Startup type to automatic-change to General Service Status click the start button-switch to the logon Tab -Change the logon identity to a local system account and allow services to interact with the desktop; for example:
--------------------------------------------------------------------------------
2.5 port opened
Two Methods: one is to disable the firewall, and the other is to open port 873 on the firewall;
--------------------------------------------------------------------------------