记性不好了 总是忘记 只有记录一下了
1)默认rsync服务没有 /etc/rsyncd.conf文件 需要创建一个 并且贴入以下内容:
uid = root
gid = root
port = 873
hosts allow = 192.168.1.101,192.168.1.102
use chroot = true
max connections = 5
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[test]
path = /tmp/test
comment = rsync files
ignore errors
read only = yes
auth users = rsync
secrets file = /etc/rsync.passwd
2) echo "rsync:test" > /etc/rsync.passwd
3) chmod 600 /etc/rsync.passwd
4) rsync --daemon
5) 客户端: rsync -avzP rsync@xxx.xxx.xxx.xxx::test /tmp/
以上记录下