博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
rsync+inotify配置笔记
阅读量:6958 次
发布时间:2019-06-27

本文共 1715 字,大约阅读时间需要 5 分钟。

  hot3.png

rsync+innotify端配置文件脚本

src=/data/tfCarFace/DB_slave2=10.171.54.183DB_slave1=10.162.209.36atlas1=10.162.211.200atlas2=10.171.53.150DB_master1=10.162.213.176DB_master2=10.165.65.246user=testds1=DB-slave2ds2=atlas1ds3=atlas2ds4=DB-slave1ds5=DB-master1ds6=DB-master2#passwdfile=/etc/rsyncd.pass  /usr/bin/inotifywait -mrq --timefmt '%d%m%y %H:%M' --format '%T %w%f%e' -e create,delete,modify,attrib $src \  | while read files    do/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_slave2::$ds1  > /dev/null 2>&1/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$atlas1::$ds2  > /dev/null 2>&1/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$atlas2::$ds3  > /dev/null 2>&1/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_slave1::$ds4  > /dev/null 2>&1/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_master1::$ds5  > /dev/null 2>&1/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_master2::$ds6  > /dev/null 2>&1        echo "${files} was rsynced" >>/tmp/rsync.log 2>&1    done

需要同步的客户端配置

uid=rootgid=rootmax connections=10use chroot=nolog file=/var/log/rsyncd.logpid file=/var/run/rsyncd.pidlock file=/var/run/rsyncd.lock[atlas1]path=/data/tfCarFace/comment = TfCarFace backupignore errors = yesread only = noauth users=testsecrets file=/etc/rsyncd.passhosts allow = 10.0.0.0/8hosts deny = *

 

转载于:https://my.oschina.net/kcw/blog/333137

你可能感兴趣的文章
怎么做网线,网线水晶头接法和线序
查看>>
angular的service服务eg:value,constant,factory,service
查看>>
学习笔记之Python全栈开发/人工智能公开课_腾讯课堂
查看>>
学习笔记之CloudCompare
查看>>
UEditor 与Struts2 结合上传图片
查看>>
《FPGA全程进阶---实战演练》第一章之FPGA介绍
查看>>
Jmeter入门--安装教程
查看>>
使用stylus
查看>>
linux RTC 驱动模型分析【转】
查看>>
运用《深入理解Java虚拟机》书中知识解决实际问题
查看>>
jackson用法
查看>>
一步一步搭建springboot+mybatis+jta框架
查看>>
C++文件操作和模板
查看>>
八行代码解决八皇后问题(c++)
查看>>
初级模拟电路:1-8 齐纳二极管
查看>>
基线系统需要受到更多关注:基于词向量的简单模型
查看>>
自然语言处理中的自注意力机制(Self-attention Mechanism)
查看>>
PIVOT 用于将列值旋转为列名
查看>>
php 内存超出
查看>>
listtoordereddict 多列表转化为字典
查看>>