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




猜你喜欢

转载自blog.csdn.net/yccn214/article/details/53138008