1、启动rsync服务
编辑/etc/xinetd.d/rsync文件,将其中的disable=yes改为disable=no,并重启xinetd服务,如下:
# vi /etc/xinetd.d/rsync #default: off # description: The rsync server is a good addition to an ftp server, as it / # allows crc checksumming etc. service rsync { disable = no socket_type = stream wait = no user = root server = /usr/bin/rsync server_args = --daemon log_on_failure += USERID }
# /etc/init.d/xinetd restart 停止 xinetd: [确定] 启动 xinetd: [确定] |
2. 2、创建配置文件 (只要在主的上面就可以了,也就是ap1上,ap2無需配置)
默认安装好rsync程序后,并不会自动创建rsync的主配置文件,需要手工来创建,其主配置文件为“/etc/rsyncd.conf”,创建该文件并插入如下内容:
uid = root
gid = root
use chroot = no
max connections = 100
[tiptop]
path = /u/tiptop
comment = tiptop
3.在從(ap2)上執行如下腳本
rsync -avlogptH --progress --delete root@qkkshwxap1::tiptop /u1/tiptop