29

1.安装rsync。
rsync的编译安装非常简单,只需要以下简单的几步:
[root@www rsync-2.4.6]# ./configure
[root@www rsync-2.4.6]# make
[root@www rsync-2.4.6]# make install
但是需要注意的是必须在服务器A和B上都安装rsync,其中A服务器上是以服务器模式运行rsync,而B上则以客户端方式运行rsync。这样在web服务器A上运行rsync守护进程(/usr/bin/rsync –daemon),在B上定时运行客户程序来备份web服务器A上需要备份的内容。

2.配置服务器端/etc/rsyncd.conf,例如:
uid = nobody
gid = nobody
max connections = 30
timeout = 1800
#use chroot = yes
hosts allow =192.168.41.133 192.168.41.127 192.168.41.128 192.168.41.178 61.135.132.17 192.168.41.163 192.168.41.164 192.168.41.126 192.168.132.26
# hosts above  abc4
syslog facility = local7
pid file = /etc/rsyncd.pid


[rsync_content]
       path=/usr/local/apache/htdocs
       comment = html
       list    = no


[rsync_keywords]
       path=/usr/local/apache/htdocs/data
       comment =       data
       read only=      no
       list    =       no


Tags: ,

作者:堕落天使

Leave a Reply

You must be logged in to post a comment.

Switch to our mobile site