在Windows中配置Rsync同步文件的方法
Rsync是一款不错的文件免费同步软件,可以镜像保存整个目录树和文件系统,同时保持原来文件的权限、时间、软硬链接。第一次同步时rsync会复制全部内容,下次只传输修改过的文件部分。传输数据过程中可以实行压缩及解压缩操作,减少带宽流量。支持scp、ssh及直接socket方式连接,支持匿名传输。支持Linux,Window平台。写本文的时候,window版最新版为4.0.5版
官网:http://rsync.samba.org/
Linux版下载:http://rsync.samba.org/download.html
Windows版下载:https://www.itefix.no/i2/cwrsync-get 选(FreeEdition免费版)
客户端:cwRsync4.0.5Installer
服务端:cwRsyncServer4.0.5Installer
现在官方开始了收费版本,建议从毛票票下载免费版本
cwRsyncwin服务器同步软件cwRsync_2.1.5_Installer.zip 服务器数据同步服务器端cwRsync_Server_2.1.5_Installer.zip 服务器文件同步cwRsync_3.1.0_Installer.zip 服务器文件同步软件服务器端cwRsyncServer_3.1.0_Installer.zip
一、安装配置Rsync服务端
Window版服务端:
1.点击服务端安装程序进行安装,安装过程中提示输入服务端程序以服务运行时的用户名,密码。可以自定义,也可以用默认的用户名密码设置。
2.安装完成之后,进入程序安装目录根目录,打开配置文件(如:C:\ProgramFiles\ICW\rsyncd.conf),进入配置。
usechroot=false strictmodes=false lockfile=rsyncd.lock hostsallow=192.168.1.21 maxconnections=5 port=28950 pid=0 uid=0
logfile=/cygdrive/f/RsyncLog/rsyncd.log
#Moduledefinitions #Remembercygwinnamingconventions:c:\workbecomes/cygdrive/c/work
[data_backup] path=/cygdrive/f/dataBackup authusers=dbbackuper secretsfile=/cygdrive/e/Setting/Rsync/rsync_db.ps readonly=no list=no transferlogging=yes