rsync的配置

来源:互联网 发布:township清除数据ios 编辑:程序博客网 时间:2024/05/19 03:42
怎么使用rsync呀?
/etc/rsyncd.conf如下:
uid = nobody
gid = nobody
use chroot = no # 不使用chroot
max connections = 4 # 最大连接数为4
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log # 日志记录文件

[inburst] # 这里是认证的模块名,在client端需要指定
path = /home/soft/ # 需要做镜像的目录
comment = BACKUP CLIENT IS SOLARIS 8 E250
ignore errors # 可以忽略一些无关的IO错误
read only = yes # 只读
list = no # 不允许列文件
auth users = inburst # 认证的用户名,如果没有这行,则表明是匿名
secrets file = /etc/inburst.pas # 认证文件名

[web]
path = /usr/local/apache/htdocs/
comment = inburst.org web server
然后/etc/inburst.pas如下:
inburst:hack
有用户nobody组nobody
用户inburst密码hack
/home/soft/ 为777
用指令rsync -vzrtopg --progress --delete inburst@192.168.92.154::inburst /tmp/
Password:
@ERROR: auth failed on module inburst
用telnet 192.168.92.154 873
Trying 192.168.92.154...
Connected to 192.168.92.154.
Escape character is '^]'.
@RSYNCD: 24
ls
@ERROR: protocol startup error
Connection closed by foreign host.
原创粉丝点击