手动运行时,是可以同步过来的,但就是不能自动触发运行;就是 /mnt 有变化了,也不能自动触发同步。
试了 incron 的 IN_ALL_EVENTS,也是一样,也不能触发自动同步。望高人赐教!
这是配置文件。
settings {
logfile = "/var/log/lsyncd.log",
statusfile = "/var/log/lsyncd.status"
}
sync {
default.rsync,
source = "/mnt/pmc",
target = "/home/总库 /pmc",
exclude = {".",".tmp","~."}
}
mount -t cifs -o ...
settings {
statusFile = "/var/log/lsyncd/lsyncd.status",
statusInterval = 1,
logfile="/var/log/lsyncd/lsyncd.log",
insist = true,
}
sync {
default.rsync,
source = "/opt/tomcat-app-8008/webapps",
target = "[email&exclude = { ".*", ".tmp", "/*.zip", "/*.gz", "/*.war", "/*.bak"},
delay = 600,
maxProcesses = 4,
rsync = {
binary = "/usr/bin/rsync",
archive = true,
acls = true,
compress = true,
verbose = true,
owner = true,
group = true,
perms = true,
password_file = "/etc/6666.pwd",
_extra = {"--bwlimit=300"}
}
}
这是我用的局域网配置,和你的有点区别。仅供参考:
Version: 2.1.6