分类: LINUX
2013-06-30 18:51:29
pid file = /var/run/rsyncd.pid
port = 873
address = 10.18.20.32
#uid = nobody
#gid = nobody
uid = root
gid = root
use chroot = yes
read only = yes
hosts allow=10.18.20.33/255.255.255.255
hosts deny=*
max connections = 1
motd file = /etc/rsyncd/rsyncd.motd
log file = /var/log/rsync.log
#transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
[linux_home]
path = /home/wangxiao/
list=yes
ignore errors
auth users = rsyncuser
secrets file = /etc/rsyncd/rsyncd.secrets
comment = wang's home
#exclude =
-----------------------------------------------------------------------
for x in $(echo $_list|grep -v '^#'|sed -e '/^$/d');do
_info=( $(echo "$x"|awk -F'|' '{print $1,$2}') )
_ip=$(echo ${_info[0]})
_file=$(echo ${_info[1]})
for i in $_file;do
rsync -Hxva --delete --exclude=logs/* --exclude=*.tar.gz $_ip:$_file $_dir
done
done