中国开发网: 论坛: 程序员情感CBD: 贴子 593324
haitao
windows下rsync server使用2007-02-09 11:50web 站点的数据备份 rsync 官方站点
——不敢使用。。。。。。。。。。。

windows下rsync server使用2007-02-09 11:50web 站点的数据备份 rsync 官方站点
http://rsync.samba.org/
http://samba.anu.edu.au/rsync/download.html
[ WINDOWS 2003 RSYNC 服务端 ]
rsync for windows download :
http://switch.dl.sourceforge.net/sourceforge/sereds/cwRsync_Server_2.0.10_Installer.zip 1. 安装
选择安装路径 D:\cwRsyncServer , 注: rsync 是作为cgywin的一个包装到windows下的
安装时 Rsync 会做下面的工作
a. 新建一个用户SvcwRsync 并且这个用户是管理员用户
b. 设置好安装目录的权限 D:\cwRsyncServer , 请不要自行更改权限
c. 创建服务RsyncServer 低版本中可能需要手工做上面的步骤 , 并需要象下面一样手工创建服务 , 但是这里3个步骤安装程序都已经做好了
cygrunsrv.exe -I "Rsync" -p /cygdrive/d/cwRsyncServer/bin/rsync.exe -a "--config=/cygdrive/d/cwRsyncServer/etc/rsyncd.conf --daemon --no-detach"
-f "Rsync" -u Administrator -w 123456
2. 修改rsync服务的配置文件 .
#################
#rsyncd.conf
#################

use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
max connections = 4               # 最大连接数为4

# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/d/cwRsyncServer/var/backup
read only = false
ignore errors
auth users = test_user
secrets file= /cygdrive/d/cwRsyncServer/etc/rsync.pass
transfer logging = yes

[a.b]
path = /cygdrive/d/cwRsyncServer/var/backup/51.201
read only = false
ignore errors
auth users = a.b
hosts allow=61.129.a.b
secrets file= /cygdrive/d/cwRsyncServer/etc/rsync.pass
transfer logging = yes

###
# rsync.pass 文件内容 :
###
test_user:123456
a.b:abc

3. 创建备份目录 如 /var/backup 相当与 D:\cwRsyncServer\var\backup 也就是 /cygdrive/d/cwRsyncServer/var/backup4. 确定administrator对 D:\cwRsyncServer 目录有完全控制的权限 包括子目录 (可以略去 前面安装的时候 安装程序已经自动设定了)
5. 在服务里面启动 RsyncServer 服务 正常的话可以看到873端口在listening 参考
http://www.stcore.com/html/2006/0216/112591.html
http://bbs.chinaunix.net/viewthread.php?tid=346603&extra=&page=1 rsync 客户端使用 如rsync -vrtz conf a.b@61.129.70.*::a.b # 上传
rsync -vrtz a.b@61.129.70.*::a.b bak # 下载
rsync -vrtz a.b@61.129.70.*::a.b/conf/apache_configuration bak # 下载一部分

类别:技术学习 | 添加到搜藏 | 浏览(437) | 评论 (2) 上一篇:使用rsync从linux到linux或到win... 下一篇:用rsync从Linux到Windows远程备... 相关文章:• Rsync + SSH -- 让 Server 自动...         
最近读者: 登录后,您就出现在这里。
jackpig collinforever wardking_china ringyang
网友评论:1
ringyang 2007-09-08 20:54 版主您好,拜读完您的大作,按照您说步骤我配置成功后在rsync客户端添加了代码--password-file=/cygdrive/d/wRsync/etc/rsync.pass,目的是希望在下载的时候不用手动输入密码,但是老是出错,错误如下:
password file must not be other-accessible
continuing without password file
Password:
在网上搜索了一下,都说是由于rsync.pass文件权限的问题,只要chmod 600 rsync.pass就可以了,我也安装此方法测试了,还是出现同样的错误,请问版主该问题该如何解决,谢谢!

2
ringyang 2007-09-08 20:56 附:
我的服务端系统是:win2003
客户端系统是:winxp
我的blog:http://szhaitao.blog.hexun.com & http://www.hoolee.com/user/haitao
--以上均为泛泛之谈--
不尽牛人滚滚来,无边硬伤纷纷现 人在江湖(出来的),哪能不挨刀(总归是要的)
网络对话,歧义纷生;你以为明白了对方的话,其实呢?

您所在的IP暂时不能使用低版本的QQ,请到:http://im.qq.com/下载安装最新版的QQ,感谢您对QQ的支持和使用

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录