Centos7数据实时同步
Rsync+inotify 功能要求 通过rsync+inotify将数据库指定目录实时同步到备份服务器。 环境说明 M:192.168.10.11 数据库服务器 S:192.168.10.13 备份服务器 备份服务器操作 # yum -y install rsync # useradd rsync -s /sbin/nologin -M # mkdir -pv /kazihuo/bak # chown rsync.rsync /kazihuo/bak # cat /etc/rsyncd.conf pid file = /var/run/rsyncd.pid [Rsc-bak] uid = rsync gid = rsync path = /kazihuo/bak/ max connections = 200 log file = /var/log/rsyncd.log auth users = rsync-k secrets file = /etc/rsync.password # cat /etc/rsync.password rsync-k:000000 # chomd 600 /etc/rsync.password # rsync --daemon # ss -autnpl |grep rsync tcp LISTEN 0 5 *:873 *:* users:((