Rsync同步报错【ERROR: Unknown module】
2014-11-06 16:09
183 查看
一,环境描述:
192.168.1.10 rsyncd服务端
192.168.1.2,192.168.1.3 rsyncd客户端
二,配置:
192.168.1.10 服务端配置:
1,rsyncd.conf 配置:
[root@localhost ~]# cat /etc/rsyncd.conf
# write by Chris on 20140915
# rsync服务端配置文件
uid = www
gid = www
use chroot = no
max connections = 1024
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
hosts allow = 192.168.1.2
hosts allow = 192.168.1.3
[test]
path = /www/test/
comment = test
ignore errors = true
read only = no
list = no
auth users = www
secrets file = /etc/rsync.pass
2,rsync.pass 文件属性和账号密码:
[root@localhost ~]# ll /etc/rsync.pass
-rw------- 1 root root 15 Sep 15 00:07 /etc/rsync.pass
[root@localhost ~]# cat /etc/rsync.pass
www:xvdaf+Ax8
192.168.1.2,192.168.1.3 客户端同步命令:
remoteip="192.168.1.10"
appName="test"
/usr/bin/rsync -avz --password-file=$HOME/.rsync.pas --exclude-from=exclude.txt www@${remoteip}::test /www/${appName}
执行结果:
192.168.1.3 客户端正常同步
192.168.1.2 客户端报错如下
rsync www@${remoteip}::test @ERROR: Unknown module 'test' 不认识我的模块
解决:
rsyncd.conf 文件
hosts allow = 192.168.1.2hosts allow = 192.168.1.3修改为
hosts allow = 192.168.1.2,192.168.1.3
即将允许客户端IP列表并排一行,使用逗号隔开,经验证同步正常。
192.168.1.10 rsyncd服务端
192.168.1.2,192.168.1.3 rsyncd客户端
二,配置:
192.168.1.10 服务端配置:
1,rsyncd.conf 配置:
[root@localhost ~]# cat /etc/rsyncd.conf
# write by Chris on 20140915
# rsync服务端配置文件
uid = www
gid = www
use chroot = no
max connections = 1024
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
hosts allow = 192.168.1.2
hosts allow = 192.168.1.3
[test]
path = /www/test/
comment = test
ignore errors = true
read only = no
list = no
auth users = www
secrets file = /etc/rsync.pass
2,rsync.pass 文件属性和账号密码:
[root@localhost ~]# ll /etc/rsync.pass
-rw------- 1 root root 15 Sep 15 00:07 /etc/rsync.pass
[root@localhost ~]# cat /etc/rsync.pass
www:xvdaf+Ax8
192.168.1.2,192.168.1.3 客户端同步命令:
remoteip="192.168.1.10"
appName="test"
/usr/bin/rsync -avz --password-file=$HOME/.rsync.pas --exclude-from=exclude.txt www@${remoteip}::test /www/${appName}
执行结果:
192.168.1.3 客户端正常同步
192.168.1.2 客户端报错如下
rsync www@${remoteip}::test @ERROR: Unknown module 'test' 不认识我的模块
解决:
rsyncd.conf 文件
hosts allow = 192.168.1.2hosts allow = 192.168.1.3修改为
hosts allow = 192.168.1.2,192.168.1.3
即将允许客户端IP列表并排一行,使用逗号隔开,经验证同步正常。
相关文章推荐
- linux下rsync的配置以实现文件夹的同步及常见error总结
- rsync 同步错误 cwrsync rsync error rsync error: some files/attrs were not transferred 解决方法
- vagrant rsync-auto 代码同步失败报错:UndefinedConversionError
- linux下rsync的配置以实现文件夹的同步及常见error总结
- Rsync文件同步
- rsync加inotify实现无间隔文件同步
- rsync远程同步指定文件
- Linux下利用rsync实现网站镜像同步
- 真正的inotify+rsync实时同步 彻底告别同步慢
- rsync从linux到linux的文件同步备份
- Rsync同步文件配置
- 用rsync做同步备份
- Cent OS 5.4 rsync+inotify配置触发式(实时)远程同步
- Rsync+Inotify基础配置 以及 Rsync+Inotify配置实现文件自动同步
- 采用rsync实现两台solaris服务之间的文件同步
- rsync 同步文件
- linux下使用rsync同步目录
- rsync从linux到linux的文件同步
- rsync 手动同步
- 解决方法:rsync error: some files could not be transferred (code 23) at main.c(702)