rsync服务器

# cat /etc/rsyncd.conf
uid=root
gid=root
use chroot = yes
read only = no
max connections = 20
timeout = 300
motd file = /etc/rsyncd.motd
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
#不加这个就默认没没密码
secrets file = /etc/pass.crt
[www]
path = /data/
list=yes
auth users = www
chmod 600 /etc/pass.crt
[root@localhost srv]# cat /etc/pass.crt
www:www
srv]# useradd www
rsync --daemon
client
rsync --list-only www@192.168.1.10::
rsync -avzP /data/tmp/ rsync://www@192.168.1.10/www

***********************************************************************************
4game 一般的应该场景如下
service

echo '
uid=root
gid=root
use chroot = yes
read only = no
max connections = 20
timeout = 300
motd file = /etc/rsyncd.motd
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
secrets file = /etc/pass.crt
[phpbill]
path = /data/www/xunlei/log/
list=yes
auth users = bill ' > /etc/rsyncd.conf
echo 'bill:test' > /etc/pass.crt
chmod 600 /etc/pass.crt
rsync --daemon &
##*******************
# client 360
env RSYNC_PASSWORD=test rsync -avz bill@10.21.188.252::phpbill ./