rsync+inotify


yum install inotify-tools
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
/usr/bin/inotifywait -mrq --timefmt '%Y%m%d-%H:%M' --format '%T %e %w%f' -e  close_write,modify,delete,create,move,attrib /data/www/fg/gamelist/public | while read x
do

#rsync -avzp --port=873 --delete  --progress  --exclude ".svn" --exclude ".git"  --exclude "*.php" --password-file=/etc/rsync_fgcdn --bwlimit=25000 /data/www/fg/gamelist  cdn_fg@119.23.145.117::cdn_fg

rsync -avzp --port=37873 --delete --password-file=/etc/rsync_wlcdn /data/www/fg/gamelist/public/ rsync@10.200.78.118::wl-gamelobby-gamelist

echo $x >> /var/log/rsync_inotify.log
done &