Rsync+inotify做文件同步
?
测试
1.启动客户端服务:
sh# /usr/local/rsync/bin/rsync --daemon --port=873
2.启动监控脚本,此脚本支持多目录多服务器监控
sh#? ./inotify-rsync.sh
??? 3.增加文件
sh# touch happy.txt
4.查看/tongbu1、/tongbu2中文件变化