yum install rsync shell
vi /etc/rsyncd.conf ui
uid = root gid = root use chroot = no max connections = 30 pid file = /var/run/rsyncd.pid lock file = /var/run/rsyncd.lock log file = /var/log/rsyncd.log transfer logging = yes log format = %t %a %m %f %b syslog facility = local3 timeout = 300 hosts allow = 127.0.0.1,192.168.130.199 read only = yes auth users = root secrets file = /etc/rsync.pas [bbsdata] path = /filevi /etc/rsync.pas
root:123456
chmod 700 /etc/rsync.pas spa
重啓
ps -ef |grep rsynckillall rsync
rm -rf /var/run/rsync* && rsync --daemon code
客戶端: orm
rsync -aP --delete root@192.168.130.199::dbbak/199news /www/dbbak --password-file=/www/rsync.pas ci
vi rsync.pas it
123456 io
chmod 400 /www/rsync.pas form