3)编写inotify实时监控脚本
vim inotify.sh
#!/bin/sh
/usr/bin/inotifywait -mrq -e create,delete,close_write /data|
while read line
do
rsync -avz --delete /data/ rsync_backup@172.16.1.41::backup --password-f ile=/etc/rsync.password
done
4)放入后台运行
sh inotify &
原文地址:http://blog.51cto.com/13670729/2118054