首页 > 代码库 > rsync+inotify配置笔记

rsync+inotify配置笔记

rsync+innotify端配置文件脚本

src=http://www.mamicode.com/data/tfCarFace/"tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_slave2::$ds1  > /dev/null 2>&1
/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$atlas1::$ds2  > /dev/null 2>&1
/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$atlas2::$ds3  > /dev/null 2>&1
/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_slave1::$ds4  > /dev/null 2>&1
/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_master1::$ds5  > /dev/null 2>&1
/usr/bin/rsync -vzrtopg  --delete --exclude "tfcfg.ini" --progress --password-file=/etc/rsyncd.pass $src $user@$DB_master2::$ds6  > /dev/null 2>&1
        echo "${files} was rsynced" >>/tmp/rsync.log 2>&1
    done
需要同步的客户端配置

uid=root
gid=root
max connections=10
use chroot=no
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsyncd.lock

[atlas1]
path=/data/tfCarFace/
comment = TfCarFace backup
ignore errors = yes
read only = no
auth users=test
secrets file=/etc/rsyncd.pass
hosts allow = 10.0.0.0/8
hosts deny = *




rsync+inotify配置笔记