#需求:
需要98和99互相同步,
现在先以98为Master,99为Slave,98 ->99。
98 | 99 |
---|---|
sersync | rsync |
/data/98_a | /data/99_b |
配置自己本地的路径 & 允许别人远程的IP | 配置自己的路径 |
#一、步骤
1、先在(从上)99安装rsync:
配置文件:
vim /etc/rsyncd.conf
uid=root
gid=root
max connections=36000
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock
[tongbu1]
path= /data/99_b(自己的路径)
files ignore errors = yes
read only = no
auth user = root
secrets file = /etc/rsyncd.pwd
设置密码:
ps:这里 /etc/rsyncd.pwd的配置是键值对,即 用户名:密码
echo root:123 > /etc/rsyncd.pwd
启动rsync
rsync --daemon 【--config=....】
2、在98(主上)上安装sersync
链接: