Advertisement

inotify+rsync用于同步服务器工具使用记录

阅读量:

inotify+rsync同步服务器

在2台备份服务器上实时同步备份 主服务器指定的文件目录

简单的需求可以用简单工具解决,也许还有更简单的办法可以借鉴.
采用Inotify进行文件监控并配合rsync实现同步.
https://www.cnblogs.com/architectforest/p/12360875.html

https://www.cnblogs.com/ginvip/p/6430986.html

ip 用途 系统
192.168.3.131 主服务器 kali
192.168.3.97 备份服务器 VM-CentOS-8.2.2004-x86_64-dvd1
192.168.3.103 备份服务器 VM-CentOS-8.2.2004-x86_64-dvd1

1 主服务器配置

复制代码
    vim   /etc/rsyncd.password
    #创建文件 并写入 密码test
    chmod 600   /etc/rsyncd.password
    #权限必须是600
文件 默认值 说明
max_user_watches 8192 设置inotifywait或inotifywatc

全部评论 (0)

还没有任何评论哟~