使用 lsyncd 同步文件
https://unix.stackexchange.com/questions/307046/real-time-file-synchronization
https://github.com/axkibe/lsyncd
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync.
--
settings {
statusFile = "/home/root/lsyncd.stat",
statusInterval = 1,
logfile = "/home/root/lsyncd.log",
maxProcesses = 2,
}
sync{
default.rsync,
source="/home/root/test_sync_src/",
target="/home/root/test_sync_dist/",
delay = 1,
rsync = {
append = false,
compress = true,
group = true,
owner = true,
}
}

浙公网安备 33010602011771号