本文共 302 字,大约阅读时间需要 1 分钟。
#!/bin/bash BINLOGSSRC='/var/log/mysql/' BINLOGSDST='b62@192.168.192.219::binlogs' /usr/bin/inotifywait -mrq --timefmt '%y-%m-%d %H:%M' --format '%T %w %f %e' -e create,delete,move,modify $BINLOGSSRC|while read files do rsync -avzP --password-file=/etc/rsyncd.pass --delete $BINLOGSSRC $BINLOGSDST done转载地址:http://iyuhj.baihongyu.com/