Rsync同步文件配置

Rsync 簡單配置,實現文件及文件夾同步功能:


yum install rsync
touch /etc/rsyncd.conf
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
#secrets file = /etc/rsyncd.pas
motd file = /etc/rsyncd.motd
read only = no
hosts allow = 10.90.3.118
list = no
uid = root
gid = root
use chroot = no
max connections = 30
strict modes = no

[rdata]
path = /data/rsync_data/
read only = no
/etc/rsyncd.conf

啓動:
rsync --daemon --config=/etc/rsyncd.conf

同步文件夾 需要  rsync -Rr 文件夾名 ip::目標模塊

例子:
rsync   index.html   [email protected]::rdata
rsync   -Rr  images   [email protected]::rdata




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章