假定192.168.1.1为生产环境主机A,操作系统为centos,A上安装有安装有fastdfs文件服务,并存储了文件。
假定 192.168.1.2为备份主机B,操作系统为centos,B上未安装fastdfs文件服务。
现要实现在在B主机中拉取A主机的文件,每天凌晨3点定时增量备份。
1、主机A安装Rsync
yum install rsync
2、主机A配置rsyncd.conf
执行 vi /etc/rsyncd.conf
port = 873
uid = root
gid = root
use chroot = no
max connections = 50
pid file = /var/run/rsyncd.pid
# exclude = lost+found/
# transfer logging = yes
timeout = 900
# ignore nonreadable = yes
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
secrets file = /etc/rsyncd.secrets
hosts allow = 10.213.3.30 10.213.3.31 #允许的网络
auth users = fdfs #虚拟用户
[fastdfs] #模块名
path = /scii/data/fastdfs