设置脚本开机自启动:
[root@linuxidc ~]# chmod +x /etc/rc.d/rc.local
[root@linuxidc ~]# ll /etc/rc.d/rc.local
-rwxr-xr-x. 1 root root 473 Aug 5 2017 /etc/rc.d/rc.local
[root@linuxidc ~]# echo 'nohup /bin/bash /scripts/inotify.sh' >> /etc/rc.d/rc.local
[root@linuxidc ~]# tail -1 /etc/rc.d/rc.local
nohup /bin/bash /scripts/inotify.sh
更多rsync相关教程见以下内容:
CentOS 6.5 rsync+inotify实现数据实时同步备份 https://www.linuxidc.com/Linux/2016-11/137655.htm
rsync+inotify实现数据的实时同步 https://www.linuxidc.com/Linux/2017-01/139778.htm
rsync+inotify实现服务器之间文件实时同步详解 https://www.linuxidc.com/Linux/2016-11/137659.htm
Rsync结合Inotify 实时同步配置 https://www.linuxidc.com/Linux/2017-02/140877.htm
RSync实现数据���份 https://www.linuxidc.com/Linux/2017-06/144913.htm
inotify+rsync实现数据实时同步 https://www.linuxidc.com/Linux/2017-10/147901.htm
rsync+inotify实现数据的实时备份 https://www.linuxidc.com/Linux/2016-11/137630.htm
rsync+inotify实现数据自动同步 https://www.linuxidc.com/Linux/2017-03/141717.htm
使用rsync实现数据实时同步备份 https://www.linuxidc.com/Linux/2017-05/143462.htm
unison+inotify实现数据实时双向同步 https://www.linuxidc.com/Linux/2018-01/150468.htm
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx