Rsync 同步搭建
生活随笔
收集整理的這篇文章主要介紹了
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 權限設置為 600 ,不然備份不成功!
然后啟動 sudo?/usr/bin/rsync --daemon --config=/etc/rsyncd/rsyncd.conf
Client:
之需要安裝rsync,不需要配置,然后就是同步了:
rsync -avzP root@172.16.5.100::data ./
轉載于:https://blog.51cto.com/iter2012/1536823
總結
以上是生活随笔為你收集整理的Rsync 同步搭建的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 后缀数组 --- HDU 3518 Bo
- 下一篇: MVC-READ2