inotify+rsync实现文件同步更新
2013-08-30 10:36
246 查看
下载inotify:
wget http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
解包安装:
tar xvf inotify-tools-3.14.tar.gz -C /usr/src
cd /usr/src/inotify-tools-3.14
./configure && make && make install
DIR=需要被监控的目录
同步脚本:
#!/bin/bash
inotifywait -rmsq -o /var/log/inotify.log --timefmt '%Y-%d-%m %H:%M' --format '%T %w%f %e' -e modify,delete,create,attrib,move $DIR \
| while read file
do
rsync ......;
done
rsync方面就不详细了
本文出自 “HQY's 运维人生” 博客,请务必保留此出处http://ldhqy.blog.51cto.com/2788106/1285561
wget http://github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz
解包安装:
tar xvf inotify-tools-3.14.tar.gz -C /usr/src
cd /usr/src/inotify-tools-3.14
./configure && make && make install
DIR=需要被监控的目录
同步脚本:
#!/bin/bash
inotifywait -rmsq -o /var/log/inotify.log --timefmt '%Y-%d-%m %H:%M' --format '%T %w%f %e' -e modify,delete,create,attrib,move $DIR \
| while read file
do
rsync ......;
done
rsync方面就不详细了
本文出自 “HQY's 运维人生” 博客,请务必保留此出处http://ldhqy.blog.51cto.com/2788106/1285561
相关文章推荐
- inotify+rsync实现linux文件批量更新
- rsync + lnotify 实现数据的实时同步更新
- rsync + inotify 实现两台主机间文件的同步备份
- inotify + rsync实现linux文件实时同步
- inotify + rsync实现linux文件实时同步
- inotify + rsync 实现 linux 文件实时同步
- inotify + rsync实现linux文件实时同步,使用触发同步机制
- inotify+rsync实现Linux文件实时更新
- Rsync + Inotify 实现文件自动同步
- inotify+rsync实现文件实时同步
- Inotify+Rsync实现linux文件实时同步
- Zabbix监控系列之-Rsync+Inotify实现文件同步更新(无防火墙版)
- rsync + inotify 实现文件目录的实时单向同步
- rsync + inotify-tools实现文件的实时同步
- inotify + rsync 使用触发同步机制 实现文件 "实时同步"
- centos6.4 inotify+rsync实现文件同步设置
- Rsync + inotify 实现文件实时同步
- Linux 文件同步工具——inotify+rsync实现实时同步
- Inotify+Rsync实现linux文件实时同步
- Inotify+Rsync实现linux文件实时同步