lsyncd 无法同步 windows 共享文件。

2017-11-28 15:37:50 +08:00
 iesvme

手动运行时,是可以同步过来的,但就是不能自动触发运行;就是 /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 ...

2755 次点击
所在节点    Linux
1 条回复
yulgang
2017-12-21 11:15:06 +08:00
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 = "rsyncuser@1.2.3.4::app",

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

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/410214

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX