rsync从Windows到Linux的同步备份
[日期:2012-09-27] | 来源:Linux社区 作者:lxw66 | [字体:大 中 小] |
名称 | 角色 | IP地址 |
Windows server 2003 | 服务器 | Eth0:192.168.1.1 |
RHEL5.5 | 客户端 | Eth0:192.168.1.2 |
一、cwRsyncServer服务端配置
下载服务端cwRsyncServer 解压cwRsyncServer_4.0.3_Installer.zip,双击cwRsyncServer_4.0.3_Installer.exe我的电脑—右键管理---服务和应用—服务
找到RsyncSever,双击—启动提供桌面交互
打开E盘,创建要备份的文件夹,此处取名为benet(此处是文件夹,不是文件) 右键单击benet文件夹,选择属性,切换到安全选项,点添加 输入:SvcCWRSYNC打开C:\Program Files\ICW目录
用记事本打开rsyncd.conf,修改添加以下内容(修改之前先备份,以防出错重改)编辑rsyncd.conf文件
use chroot = false strict modes = false hosts allow = * log file = rsyncd.log # Module definitions # Remember cygwin naming conventions : c:\work becomes /cygwin/c/work # [benet] #备份模版 path = /cygdrive/e/benet read only = true #客户端只读 hosts allow = 192.168.1.2 #允许连接IP,多个IP中间用英文状态下逗号隔,不限制IP填写 *即可 auth users = benet #允许连接的用户名 secrets file = etc/rsyncd.secrets #存放用户名密码的认证文件路径在C:\Program Files\ICW目录下面新建/etc/rsyncd.secrets文件
用记事本打开,输入用户名和密码 benet:123