Windows as a file server, using the Windows service version of rsync: Cwrsyncserver Download Address: http://rsync.samba.org
The setup process is to set the account number and password for the system service, which you can default to.
Note: This account is used to enable the Crsync Server service, you need to assign the account to the corresponding permissions to sync files, otherwise you cannot manipulate the files that are synchronized.
After the installation is complete, modify the profile rsyncd.conf and the configuration file reads as follows:
Port = 52326
Use Chroot = False
Strict modes = False
#hosts Allow = * #允许所有的访问
Hosts allow = 192.168.10.2 #指定特定的IP允许访问
Log file = Rsyncd.log
Lock file = Rsyncd.lock
Max connections = 10
UID = 0
GID = 0
# Module Definitions
# Remember Cygwin naming conventions:c:work becomes/cygwin/c/work
#
[Test]
Path =/cygdrive/c/work
Read Only = False
Transfer logging = no
[Test2]
Path =/cygdrive/d/wwwroot/yanghengfei_com
Read Only = yes
Transfer logging = no
Auth users = Coldstar #同步使用的帐号
Secrets file = Rsyncd.secrets #密码文件
Note:
The format of the Rsyncd.secrets profile is user name: password, such as:
coldstar:123456
That is, a user Coldstar was added with a password of 123456.
Now let's look at an example
Both servers are windows2003 Enterprise Edition R2, all in the United States, one in the U.S. AK Room, the other in the Florida State, two networks of mutual ping value of about 60-70 milliseconds
Sync 140G files, virtual host directory, the file is not generally more ... Let rsync stop at receiving file list ... For a long time, at least 20 minutes-_-!
The first time will not be as fast as the degree, but the future increment or the difference effect is very obvious!
Rsync for Windows:server End
Rsync for Windows:client End
Downloading server-side installations
Start-> All Programs-> cwrsync Server-> 05. Start a Unix BASH Shell
Input:/bin/activate-user.sh
Press L Select Local User (too many local user names will be an error?) about 200 users on my side, but prompted "the command runs out, but one or more errors occur"
Enter a user accounts for activation: Enter a local account name
You can add a key after you create it
Exit exits
Use SSH protocol to transfer files, need to start opensshd service, start in services.msc
Edit rsyncd.conf
Start-> All Programs-> cwrsync Server-> 01. Rsyncd.conf
Use Chroot = False
Strict modes = False #严格模式是不是效验文件? (not tested)
Hosts allow = * #允许哪个IP
Log file = Rsyncd.log
PID file = Rsyncd.pid
[Test]
Path =/cygdrive/f/backup #路径
Read Only = False #是否只读, not yes
Transfer logging = yes #是否记录日志? (not to see)
Start-> run-> services.msc-> start rsync Server services
Client:
C:Program FILESCWRSYNCBIN>RSYNC.EXE-ZVRTOPG Administrator account @ip Address:/CYGDR
ive/f Disk/backup/cygdrive/f disk/backup
Synchronize the backup folder on the F disk of the remote server to the backup folder in the local F disk