1.服务器端
nano -w /etc/rsyncd.conf
uid = nobody gid = nobody use chroot = no max connections = 4 syslog facility = local5 pid file = /run/rsyncd.pid [store] path = /var/horee/store auth users = rsync secrets file = /etc/rsyncd.secrets comment = static files
chmod 600 /etc/rsyncd.secrets
nano -w /etc/rsyncd.secrets
rsync:123456
2.客户端
echo "123456">/etc/rsyncd.rsync.password
chmod 600 passwd
/usr/bin/rsync -rtlvH --delete-after --delay-updates --safe-links --max-delete=500000 --password-file=/etc/rsyncd.rsync.password rsync@dfmen.com::store /var/horee/store/