我安装了 Lsyncd 2.2.2 版来在两台 Centos 7 服务器之间进行同步。当我启动它时,一切正常,文件根据需要同步。但三分钟后他停了下来。使用 ssh 密钥建立连接。这是我在日志中的内容:
Wed Mar 24 23:41:46 2021 Normal: --- Startup --- Wed Mar 24 23:43:14 2021 Normal: recursive startup rsync: /home/ -> root@10.1.0.1:/home/ Wed Mar 24 23:43:14 2021 Normal: recursive startup rsync: /var/cpanel/datastore/ -> 10.1.0.1:/var/cpanel/datastore/ Wed Mar 24 23:43:14 2021 Normal: recursive startup rsync: /var/cpanel/databases/ -> 10.1.0.1:/var/cpanel/databases/ Wed Mar 24 23:43:15 2021 Normal: Startup of /var/cpanel/datastore/ -> 10.1.0.1:/var/cpanel/datastore/ finished. Wed Mar 24 23:43:15 2021 Normal: Startup of /var/cpanel/databases/ -> 10.1.0.1:/var/cpanel/databases/ finished. Wed Mar 24 23:44:24 2021 Error: Temporary or permanent failure on startup of /home/ -> root@10.1.0.1:/home/. Terminating since "insist" is not set.
settings{
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.stat",
statusInterval = 2,
}
-- Home
sync{
default.rsync,
source="/home",
target="root@10.1.0.1:/home",
delay = 1,
rsync={
compress = true,
verbose = true,
update = true,
perms = true,
owner = true,
group = true,
rsh ="/usr/bin/ssh -p 42 -l root -i /root/.ssh/id_rsa",
}
}
sync{
default.rsync,
source="/var/cpanel/datastore",
target="10.1.0.1:/var/cpanel/datastore",
delay = 1,
rsync={
compress = true,
verbose = true,
update = true,
perms = true,
owner = true,
group = true,
rsh ="/usr/bin/ssh -p 42 -l root -i /root/.ssh/id_rsa",
}
}
sync{
default.rsync,
source="/var/cpanel/databases",
target="10.1.0.1:/var/cpanel/databases",
delay = 1,
rsync={
compress = true,
verbose = true,
update = true,
perms = true,
owner = true,
group = true,
rsh ="/usr/bin/ssh -p 42 -l root -i /root/.ssh/id_rsa",
}
}
非常感谢您