分类: BSD
2009-01-15 11:15:57
1. 安装:yum install rsync
2. Rsync服务器的配置文件(手动创建)
mkdir /etc/rsyncd
touch /etc/rsyncd/rsyncd.conf
touch /etc/rsyncd/rsyncd.secrets
chmod 600 /etc/rsyncd/rsyncd.secrets
touch /etc/rsyncd/rsyncd.motd
3. 启动:/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf
4. 同步:rsync -avzP /home
配置文件如下:
#
# Create by 2008/09/14
#
###################################################################
# Main configuration
pid file = /var/run/rsyncd.pid
port = 873
address = IP
uid = nobody
gid = nobody
use chroot = no
read only = no
hosts allow = IP
hosts deny = *
max connections = 5
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
[home]
path = /home
list = yes
ignore errors
auth users = admin
secrets file = /etc/rsyncd/rsyncd.secrets
comment = home directory
exclude = './.bash_history.txt'
#exclude = www/ './.bash_history.txt'