學習筆記,每一天我們都在進步。
2007/01/29 21:49
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
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]