rsync 简单应用
rsync 简单应用
由于工作需要,要架设备份总结如下
1.第一:安装rsync
通过命令:yum -y install rsync 服务器,客服端均要安装
2.第二:配置rsync
主要三个配置文件需要来填充
a. touch /etc/rsyncd.conf (目录可以自己定义,启动时候弄清配置文件即可,建议默认)
vi /etc/rsyncd.conf
# See rsync(1) and rsyncd.conf(5
pid file = port = 873
address = 192.168.1.2
#uid = #gid =
uid = gid =
use chroot = read only =
hosts allow=192.168.1.101
#hosts deny=
max connections = 5
motd file =
#log file = log file =
#This will log every file transferred - up to 85,000+ per user, #transfer logging =
log format = syslog facility = timeout = 300
path = list= auth users = secrets file = comment =
path = list= auth users = secrets file = comment = This is named
注意IP,还有运用用户ID,用户组ID,
b. touch /etc/rsyncd.pa 创建密码文件 格式:用户名:用户密码
vi /etc/rsyncd.pa 注意此文件权限必须为 600
chmod 600 /etc/rsyncd.pa
test:test
c. touch /etc/rsyncd.motd
vi /etc/rsyncd.motd
这个文件可以随便写了
2002------2013
++++++++++++++++++++++++++++++++++++++++++++++
到这里就已经完成服务器端的配置了,简单吧
第三:客户端的操作
rsync -avzP test@192.168.1.2::named namedbck
就可以实现目录备份,具体参数自己可以网上查
八戒DNS,http://www.8jdns.com
评论暂时关闭