免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 833 | 回复: 0
打印 上一主题 下一主题

windows下rsync server使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-20 00:36 |只看该作者 |倒序浏览

web 站点的数据备份
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/backup
4. 确定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
[email=a.b@61.129.70.*::a.b]a.b@61.129.70.*::a.b[/email]
  # 上传
rsync -vrtz
[email=a.b@61.129.70.*::a.b]a.b@61.129.70.*::a.b[/email]
bak   # 下载
rsync -vrtz
[email=a.b@61.129.70.*::a.b/conf/apache_configuration]a.b@61.129.70.*::a.b/conf/apache_configuration[/email]
bak # 下载一部分


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9293/showart_203307.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP