- 论坛徽章:
- 0
|
原帖由 heidern 于 2008-11-6 16:47 发表
你是想将192.168.3.250:/opt/test同步到/tmp吧?
错误提示的意思是只有当访问rsync daemon的时候才能使用这个参数,也就是说需要客户端开启rsync daemon,并正确配置。我一般来说都会将要同步的路径配置到rs ...
回楼上的大大,客户端不用做任何设置对吗?
我的就是这么做的
[root@bogon etc]# cat rsyncd.conf
uid = nobody
gid = nobody
use chroot = no
max connectionts = 6
read only = yes
hosts allow = 192.168.3.0/24
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log
[test]
comment = test
path = /opt/test
ignore errors
list = no
auth users = rsync,test
secrets file = /etc/rsyncd.passwd
[root@bogon etc]#
然后在客户端运行结果如下:
[root@mail ~]# rsync -zvrtopg --password-file=/etc/rsyncd.passwd --delete rsync@192.168.3.250:/opt/test /tmp/
The --password-file option may only be used when accessing an rsync daemon.
rsync error: syntax or usage error (code 1) at main.c(1239) [receiver=3.0.4]
[root@mail ~]#
如果去掉password-file选项结果是这样的:
可以同步
[root@mail ~]# rsync -zvrtopg --delete rsync@192.168.3.250:/opt/test /tmp/
rsync@192.168.3.250's password:
receiving incremental file list
deleting test/77
test/
test/4
test/8
test/9
sent 72 bytes received 246 bytes 212.00 bytes/sec
total size is 0 speedup is 0.00
[root@mail ~]#
不会因为我版本的问题吧????
rsync-3.0.4.tar.gz |
|