免费注册 查看新帖 |

Chinaunix

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

rsync同步问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-23 13:32 |只看该作者 |倒序浏览
我用Ubuntu的系统。  在rsync客户端手动执行脚本的话,是可以正常同步的。 但是如果把脚本在cron中每隔10分钟执行一次的话,就不能正常同步。
server端的日志如下:
2008/06/23 11:57:33 [24489] params.carameter() - Ignoring badly formed line in configuration file: ignore errors
2008/06/23 11:57:33 [24489] params.carameter() - Ignoring badly formed line in configuration file: ignore errors
2008/06/23 11:57:34 [24489] connect from backup.local (10.23.28.203)
2008/06/23 11:57:34 [24489] rsync on mysql-bug from rs@backup.local (10.23.28.203)
2008/06/23 11:57:34 [24489] building file list
2008/06/23 11:57:34 [24489] rsync: writefd_unbuffered failed to write 4 bytes [sender]: Connection reset by peer (104)
2008/06/23 11:57:34 [24489] rsync error: error in rsync protocol data stream (code 12) at io.c(1123) [sender=2.6.9]


server端的rsyncd.conf的配置如下:
# created by songtao at 2007/12/18
# This script is make a mirror for where is from lx-beijing101 machine's SVN Source Codes  to localhost directory  and lx-beijing280# This script is the config file of rsync serv
er .

use chroot = no
max connections = 4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log

[svn]
path = /data/SVN_REPOS/
ignore errors
read only = true
list = false
hosts allow = 10.23.28.219
hosts deny = 0.0.0.0/32
uid = root
gid = root
auth users = rs
secrets file = /etc/rsyncd.pwd

[mysql-bug]
path = /data/mysql-bug/           
ignore errors
read only = true
list = false
hosts allow = 10.23.28.219
hosts deny = 0.0.0.0/32
uid = root
gid = root
auth users = rs
secrets file = /etc/rsyncd.pwd


客户端的备份脚本如下:
#!/bin/bash
# This script is make a mirror for that backup SVN source codes from lx-beijing101 machine /data/SVN_REPOS/ to lx-beijing280 machine
#/backup-svn/SVN_REPOS/ ;

export PATH=/usr/local/bin:/usr/bin:/bin

#define backup directory;
backupdir=/backup/backup-svn/SVN_REPOS/
backupdir2=/backup/backup-svn/mysql-bug/

#make a mirror for copy lx-beijing101 svn source code to lx-beijing280;
/usr/bin/rsync -vzrtopg --delete --progress rs@10.23.28.201::svn $backupdir --password-file=/etc/rsyncd.pwd

#make a mirror for copy lx-beijing101 svn mysql-bug database to lx-beijing280;
/usr/bin/rsync -vzrtopg --delete --progress rs@10.23.28.201::mysql-bug $backupdir2 --password-file=/etc/rsyncd.pwd
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP