rsync守护进程部署流程
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rsync守护进程部署流程相关的知识,希望对你有一定的参考价值。
rsync守护进程部署流程1)服务端部署流程
第一里程:检查软件是否安装
[[email protected] ~]# rpm -qa rsync
rsync-3.0.6-12.el6.x86_64
第二里程:编写配置文件
vim /etc/rsyncd.conf
#rsync_config
#created by TY at 2018
##rsyncd.conf start##
uid = rsync
gid = rsync
use chroot = no
max connections = 200
timeout = 300
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
ignore errors
read only = false
list = false
hosts allow = 172.16.1.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_backup
secrets file = /etc/rsync.password
[backup]
comment = "backup dir by oldboy"
path = /backup
read only = true
[nfs]
comment = "backup dir by oldboy"
path = /nfs
第三个里程:创建备份目录管理用户
useradd rsync -M -s /sbin/nologin
第四个里程:创建备份目录
mkdir /backup
chown -R rsync.rsync /backup
第五个里程:创建认证文件
echo "rsync_backup:oldboy123" >>/etc/rsync.password
chmod 600 /etc/rsync.password
第六个里程:启动rsync服务
rsync --daemon
2)客户端部署流程
第一个里程:确认软件是否安装
[[email protected] ~]# rpm -qa rsync
rsync-3.0.6-12.el6.x86_64
第二个里程:创建认证密码文件
echo "oldboy123" >>/etc/rsync.password
chmod 600 /etc/rsync.password
第三个里程:进行数据备份测试
[[email protected] tmp]# rsync -avz /etc/hosts [email protected]::backup --password-file=/etc/rsync.password
sending incremental file list
hosts
sent 189 bytes received 27 bytes 432.00 bytes/sec
total size is 352 speedup is 1.63
以上是关于rsync守护进程部署流程的主要内容,如果未能解决你的问题,请参考以下文章