Rsync 同步搭建
ubuntu安裝:sudo apt-get -y install rsync
Server 端配置:
cat rsyncd.conf
pid file = /var/run/rsyncd.pid
port = 873
address = 172.16.5.100
uid = root
gid = root
use chroot = yes
read only = yes
hosts allow=172.16.3.0/255.255.255.0
log file = /var/log/rsync.log
[data]
path = /home/luoshaohui/sql
ignore errors
list=false
read only = true
auth users = root
secrets file = /etc/rsyncd/rsyncd.secrets
ps: 要把 rsync.secrets 權(quán)限設(shè)置為 600 ,不然備份不成功!
然后啟動(dòng) sudo?/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf
Client:
之需要安裝rsync,不需要配置,然后就是同步了:
rsync -avzP root@172.16.5.100::data ./
轉(zhuǎn)載于:https://blog.51cto.com/iter2012/1536823
總結(jié)
以上是生活随笔為你收集整理的Rsync 同步搭建的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 后缀数组 --- HDU 3518 Bo
- 下一篇: 新手赛(2) 第五题 因素和问题