rsync+inotify实时同步
来源:互联网 发布:mac 小红点 编辑:程序博客网 时间:2024/04/30 13:51
试验环境
192.168.10.102 安装rsync 配置rsync.conf
192.168.10.103 安装inotify,rsync
在102上做的操作,主推到103上
132.63.10.73
要有rsync
#vi /etc/rsyncd.conf
uid = root
gid = root
read only = no
use chroot = no
max connections = 512
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
log format = %t %a %m %f %b
[test]
path = /tongbu
list = no
ignore errors
auth users = backup
hosts allow = 192.168.10.72
hosts deny = *
secrets file = /etc/rsyncd.pwd
#vi /etc/rsyncd.pwd
backup:123456
#chmod 600 /etc/rsyncd.conf
#chmod 600 /etc/rsyncd.pwd
#rsync --daemon
#echo "rsync --daemon" >> /etc/rc.local
132.63.10.72
安装inotify
#vi /tmp/rsync.sh
!/bin/bash
src=/tongbu/
dst=backup@192.168.10.73::test
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f%e' -e modify,delete,create,attrib $src |while read files
do
rsync -vzrtopg --delete --progress --password-file=/home/rsyncd.pwd $src $dst
#rsync -vzrtopg --delete --progress --password-file=/home/rsyncd.pwd backup@192.168.10.73::snmp /tongbu
done
#chmod +x /tmp/rsync.sh
#vi /home/rsyncd.pwd
123456
#chmod 600 /home/rsyncd.pwd
#/tmp/rsync.sh &
#echo "/tmp/rsync.sh" >> /etc/rc.local
192.168.10.102 安装rsync 配置rsync.conf
192.168.10.103 安装inotify,rsync
在102上做的操作,主推到103上
132.63.10.73
要有rsync
#vi /etc/rsyncd.conf
uid = root
gid = root
read only = no
use chroot = no
max connections = 512
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
log format = %t %a %m %f %b
[test]
path = /tongbu
list = no
ignore errors
auth users = backup
hosts allow = 192.168.10.72
hosts deny = *
secrets file = /etc/rsyncd.pwd
#vi /etc/rsyncd.pwd
backup:123456
#chmod 600 /etc/rsyncd.conf
#chmod 600 /etc/rsyncd.pwd
#rsync --daemon
#echo "rsync --daemon" >> /etc/rc.local
132.63.10.72
安装inotify
#vi /tmp/rsync.sh
!/bin/bash
src=/tongbu/
dst=backup@192.168.10.73::test
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f%e' -e modify,delete,create,attrib $src |while read files
do
rsync -vzrtopg --delete --progress --password-file=/home/rsyncd.pwd $src $dst
#rsync -vzrtopg --delete --progress --password-file=/home/rsyncd.pwd backup@192.168.10.73::snmp /tongbu
done
#chmod +x /tmp/rsync.sh
#vi /home/rsyncd.pwd
123456
#chmod 600 /home/rsyncd.pwd
#/tmp/rsync.sh &
#echo "/tmp/rsync.sh" >> /etc/rc.local
0 0
- rsync inotify 实时同步
- rsync+inotify实时同步
- rsync+ inotify实时同步
- Rsync+Inotify实时同步
- rsync+inotify实时同步
- rsync+inotify实时同步
- Rsync+inotify 实时同步
- rsync+inotify文件实时同步
- Rsync+inotify文件实时同步
- rsync+inotify实现实时同步
- Rsync+inotify实时同步笔记
- rsync+inotify文件实时同步
- rsync+inotify 实现实时同步
- rsync+inotify实现实时同步
- 配置rsync+inotify实时同步
- rsync+inotify实现实时同步
- rsync+inotify实现实时同步
- 配置rsync+inotify实时同步
- LCA在线算法
- UINavigationController 和 UIScrollView新特性
- oracle JRockit 介绍
- 数据挖掘十大经典算法
- 卢斯卡定理模板(大数组和)
- rsync+inotify实时同步
- windows下通过cygwin来使用hadoop
- jdbc连接数据库的步骤
- 金山网络实习生面试经历
- polay定理
- 复选框控件CheckBox(选择类控件)
- 第六周作业
- 泛型的Binary Search Tree的实现,并与STL map进行操作性能上的比较
- Linux管道的实现机制