rsync 简单应用

由于工作需要,要架设备份总结如下

1.第一:安装rsync

通过命令:yum -y install rsync 服务器,香港虚拟主机,客服端均要安装

2.第二:配置rsync

主要三个配置文件需要来填充

a. touch /etc/rsyncd.conf (目录可以自己定义,启动时候弄清配置文件即可,建议默认)

vi /etc/rsyncd.conf

1 # Distributed under the terms of the GNU General Public License v2 2 # Minimal configuration file for rsync daemon 3 # See rsync(1) and rsyncd.conf(5) man pages for help 4 5 # This line is required by the /etc/init.d/rsyncd script 6 pid file = /var/run/rsyncd.pid 7 port = 873 8 address = 192.168.1.2 9 10 #uid = nobody 11 #gid = nobody12 13 uid = root14 gid = root15 16 use chroot = no 17 read only = yes 18 19 #limit access to private LANs20 hosts allow=192.168.1.101 21 #hosts deny=*22 23 max connections = 5 24 motd file = /etc/rsyncd.motd25 26 #This will give you a separate log file27 #log file = /var/log/rsync.log28 log file = /var/log/rsyncd.log29 30 #This will log every file transferred – up to 85,000+ per user, per sync31 #transfer logging = yes32 33 log format = %t %a %m %f %b34 syslog facility = local335 timeout = 300path = /data/test_rsync39 list=yes 40 ignore errors 41 auth users = test42 secrets file = /etc/rsyncd.pa 43 comment = This is dianzpweb path = /data/named47 list=yes 48 ignore errors 49 auth users = test50 secrets file = /etc/rsyncd.pa 51 comment = This is named,虚拟主机,服务器空间如果你曾歌颂黎明,那么也请你拥抱黑夜

rsync 简单应用

相关文章:

你感兴趣的文章:

标签云: