部署inotify 结合rsync
来源:互联网 发布:乐乎lofte网页版 编辑:程序博客网 时间:2024/05/19 21:40
<pre name="code" class="sql">1. 部署v-lhb-db01:/usr/local# tar xvf inotify-tools.tar inotify-tools/或者 源码包安装:# tar xzvf inotify-tools-3.14.tar.gz# cd inotify-tools-3.13# ./configure --prefix=/usr/local/inotify# make# make install2. /usr/local/inotify-tools/bin/inotifywait -mrq --timefmt %Y/%m/%d %H:%M --format %T %w%f%e -e close_write,create,move,delete,modify /var/www/zjzc-web-frontEnd/news/v-lhb-db01:/usr/local# cat rsync_inotify.sh #!/bin/bashINOTIFY_RSYNC_LOG_DIR=/var/log/inotify_rsyncif [ -d "$INOTIFY_RSYNC_LOG_DIR" ]then :else mkdir -p $INOTIFY_RSYNC_LOG_DIRfiINOTIFY_RSYNC_LOG_FILE=$INOTIFY_RSYNC_LOG_DIR/inotify_rsync_contract.logecho >$INOTIFY_RSYNC_LOG_FILEINWT=/usr/local/inotify-tools/bin/inotifywaitRSYNC=/usr/local/rsync/bin/rsyncSRC_FS1=/var/www/zjzc-web-frontEnd/news/DES_HOST1=192.168.32.119DES_USER=rootDES_MODULE1=contract$INWT -mrq --timefmt '%Y/%m/%d %H:%M' --format '%T %w%f%e' -e close_write,create,move,delete,modify $SRC_FS1 | while read FILES do $RSYNC -avz --password-file=/etc/rsyncd.secrets $SRC_FS1 ${DES_USER}@${DES_HOST1}::${DES_MODULE1} echo "$FILES was rsynced" >>$INOTIFY_RSYNC_LOG_FILE 2>&1donev-lhb-db01:/usr/local# mkdir -p /var/log/inotify_rsyncv-lhb-db01:/usr/local# sh ./rsync_inotify.sh sending incremental file list./4sent 114 bytes received 30 bytes 288.00 bytes/sectotal size is 96 speedup is 0.67sending incremental file listsent 66 bytes received 8 bytes 49.33 bytes/sectotal size is 96 speedup is 1.30sending incremental file listsent 66 bytes received 8 bytes 13.45 bytes/sectotal size is 96 speedup is 1.30sending incremental file list4sent 111 bytes received 33 bytes 288.00 bytes/sectotal size is 93 speedup is 0.65sending incremental file listsent 66 bytes received 8 bytes 148.00 bytes/sectotal size is 93 speedup is 1.26sending incremental file listsent 66 bytes received 8 bytes 148.00 bytes/sectotal size is 93 speedup is 1.26
0 0
- 部署inotify 结合rsync
- Linux下Rsync+Inotify部署
- inotify 文件系统事件监视 rsync结合使用
- rsync+inotify
- rsync + inotify
- rsync+inotify
- inotify+rsync
- rsync+inotify
- ubuntu rsync inotify 配置
- rsync inotify 实时同步
- rsync+inotify实时同步
- rsync+ inotify实时同步
- rsync+inotify实现同步
- rsync+inotify配置
- Rsync+Inotify实时同步
- inotify+rsync安装配置
- inotify+rsync安装配置
- inotify+rsync安装配置
- Android手机处理图片兼容性问题
- java里面的参数输入问题
- 【MAXScript】3DMax批量修改贴图名及模型名
- guava反射TypeToken解决泛型运行时类型擦除的问题
- 如何将一个免费的项目做成世界第一?
- 部署inotify 结合rsync
- Java静态内部类的实际应用
- springMVC系列之(三) spring+springMVC集成(annotation方式)
- BNU49101:rating计算
- linux常用的makefile模版编写
- Spring MVC 入门
- springMVC系列之(四) spring+springMVC+hibernate 三大框架整合
- VB之操作excel后不能关闭excel进程的原因及解决方法
- css中margin和padding的使用