我想阻止我的 robots.txt 文件同步到前端服务器。这是我的 /etc/lsyncd.conf 文件:
settings = {
logfile = "/tmp/lsyncd.log",
statusFile = "/tmp/lsyncd.stat",
statusInterval = 1,
}
sync{
default.rsync,
source="/var/www/html/blog",
target="sync:/var/www/html/blog",
rsyncOpts="-ltus",
excludeFrom="/var/www/html/blog/robots.txt",
}
/tmp/lsyncd.log 告诉
Normal: recursive startup rsync: /var/www/html/blog/ -> sync:/var/www/html/blog/ excluding
HELLO WORLD
Normal: Startup of '/var/www/html/blog/' finished.
Normal: Calling rsync with filter-list of new/modified files/dirs
/robots.txt
/
Normal: Finished a list = 0
这个设置似乎行不通。