settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
inotifyMode = "CloseWrite",
maxProcesses = 1,
}
sync {
default.rsyncssh,
source = "/tmp/test/",
host = "10.110.119.120",
targetdir = "/tmp/test/",
delay = 15,
rsync = {
binary = "/usr/bin/rsync",
archive = true,
compress = true,
verbose = true,
rsh = "/usr/bin/ssh -l hadoop -i /home/hadoop/.ssh/id_rsa -o StrictHostKeyChecking=no"
}
}
CentOS7部署lsyncd+rsync实现服务器文件实时同步_qianghong000的博客-CSDN博客_centos7 文件实时同步