码迷,mamicode.com
首页 > 系统相关 > 详细

Rsync 守护进程-全网部备份

时间:2019-05-23 09:34:54      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:chown   mod   only   emc   程序   syn   忽略   sbin   chroot   

一.[ Server ]编辑配置文件 ` vim /etc/rsyncd.conf` uid = rsync --- 指定管理备份目录的用户 gid = rsync --- 指定管理备份目录的用户组 port = 873 --- 定义rsync备份服务的网络端口号 fake super = yes --- 将rsync虚拟用户伪装成为一个超级管理员用户 use chroot = no --- 和安全相关的配置 max connections = 200 --- 最大连接数 同时只能有200个客户端连接到备份服务器 timeout = 300 --- 超时时间(单位秒) pid file = /var/run/rsyncd.pid --- 记录进程号码信息 1.让程序快速停止进程 2. 判断一个服务是否正在运行 lock file = /var/run/rsync.lock --- 锁文件 log file = /var/log/rsyncd.log --- rsync服务的日志文件 用于排错分析问题 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 Server" path = /backup --- 模块中配置参数 指定备份目录 二. [Server] 创建rsync用户 useradd rsync -M -s /sbin/nologin 三.[Server ] 创建密码认证文件 echo "rsync_backup:test1234." > /etc/rsync.password chmod 600 /etc/rsync.passwd 四.[Server ] 创建备份文件夹修改属主rsync mkdir -p /backup chown rsync.rsync /backup 五.[Server] 启动Rsyncd进程服务 systemctl start rsyncd systemctl enable rsyncd II

Rsync 守护进程-全网部备份

标签:chown   mod   only   emc   程序   syn   忽略   sbin   chroot   

原文地址:https://blog.51cto.com/368145/2398702

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!