1**、第一个里程碑** 搭建好备份服务器,rsync服务 2、启动inotify 1)配置epel源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo 2)检查inotify-tools是否安装 rpm -qa inotify-tools 安装 yum install -y inotify-tools

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 &