服务端部署流程:
1、检查软件是否安装
[root@backup ~]# rpm -qa rsync
rsync-3.0.6-12.el6.x86_64
2、编写配置文件
vim /etc/rsyncd.conf
#rsync_config
#created by whz at 2019
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
3、创建备份目录管理用户
useradd rsync -M -s /sbin/nologin
4、创建备份目录
mkdir /backup
chown -R rsync.rsync /backup
5、创建认证文件
echo “rsync_backup:oldboy123” >>/etc/rsync.password
chmod 600