Rsync

 一:搭建遠程容災備份系統
環境:redhat5.4 32位系統
IP:192.168.1.100 郵件系統
IP:192.168.1.20 備份機

拓撲圖


(1)Extmail rsync安裝配置
rpm -e rsync-2.6.8-3.1 --nodeps
tar -zxvf rsync-3.0.4.tar.gz
cd rsync-3.0.4
./configure
make
make install

配置主配置文件
vim /etc/rsyncd.conf
uid = nobody
gid = nobody
use chroot = no
max connections = 10
strict modes = yes
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log

[ixdba]
path = /wmail
comment = ixdba file
ignore errors
read only = no
write only = no
hosts allow = 192.168.1.20
hosts deny = *
list = false
uid = root
gid = root
auth users = test
secrets file = /etc/server.pass

配置備份帳號
[root@localhost ~]# vim /etc/server.pass
test:123456
[root@localhost ~]# chmod 600 /etc/server.pass 

啓動rsync
[root@localhost ~]# /usr/local/bin/rsync --daemon
[root@localhost ~]# ps -ef | grep rsync
root      9354     1  0 18:28 ?        00:00:00 /usr/local/bin/rsync --daemon
root      9357  3410  0 18:28 pts/1    00:00:00 grep rsync


(2)配置備份機
[root@localhost ~]# rpm -e rsync-2.6.8-3.1 --nodeps
[root@localhost ~]# tar -zxvf rsync-3.0.4.tar.gz 
[root@localhost ~]# cd rsync-3.0.4
[root@localhost rsync-3.0.4]# ./configure
[root@localhost rsync-3.0.4]# make
[root@localhost rsync-3.0.4]# make install
[root@localhost /]# vim /etc/server.pass 
123456
[root@localhost /]# chmod 600 /etc/server.pass 
[root@localhost ~]# mkdir /wmail
[root@localhost ~]#/usr/local/bin/rsync -vzrtopg --delete --progress --exclude "*access*" --exclude "debug*" [email protected]::ixdba /wmail --password-

file=/etc/server.pass


註明:在以上操作可能出現數據丟失,操作時請參考官方網站。
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章