rsync 配置

源:172.0.0.2

目标: 172.0.0.3

目标配置:

uid = root

gid = root

read only = no

hosts allow = *

[gitlab]

path = /data/store/gitlab/gitlab

comment = gitlab

secrets file = /etc/rsyncgitlab.password

asdfljaf@#akdf123dFF

启动rsync 守护进程

rsync --daemon --config=/etc/rsyncd.conf

源设置:

将密码文件放到源机器上

/etc/rsynccloud.passwd

源上脚本:

#/bin/bash

src2="/data/store/cloud/"

dst2="/data/store/cloud/"

/usr/local/bin/inotifywait -mrq -e create,delete,modify,move $src2 | while read line; do

rsync -arp -go --delete  --password-file=/etc/rsynccloud.passwd/data/store/cloud/root@172.0.0.3::cloud

echo -n "$line " >> /tmp/inotify.log

done

http://www.jb51.net/article/31920.htm

问题集锦

rsync -arp -go  --password-file=/etc/rsynccloud.passwd cloud.tgz   root@172.0.0.3::cloud

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。