I am using lsyncd for live syncing between master and slave and I want to exclude files like .htaccess and git files to slave server. I have configured like this:
sync {
default.rsync,
source="/home/test/",
target="202.63.240.146:/home/test",
excludeFrom="/home/test/public_html/.htaccess",
rsync={archive = true, perms = true, owner = true, _extra = {"-a"}, rsh ="/usr/bin/ssh -l root -i /root/.ssh/id_rsa",}
}
But seems it's not working. Can anyone please correct my configuration. My lsyncd version is 2.2.