'rsync not working in two way lsyncd configuration
I have configured lsyncd on 2 servers. below are the lsyncd config file settings for both servers:
for server 1: rsync setting: source= server1 destination= server 2
and for server 2 setting is vice versa: source= server2 destination= server1
rsync works perfectly on server 1, and immediately reflects new changes on server2,
though it has a different user and permission on the same folder.
on the second server rsunc only works when I run lsyncd config file. command: sudo service lsyncd status -l.
rsync does not work for server2, changes are not reflected immediately on server1.
Here is my lsync config setting:
server1:
*-- lsyncd config file for 2-way sync
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
statusInterval = 1,
nodaemon = true,
insist = true
}
sync {
default.rsync,
source = "path/uploads",
target = "bitnami@<IP_server2>:/path/uploads",
delete = 'running',
--delay = 5,
rsync = {
-- timeout = 3000,
update = true,
times = true,
archive = true,
compress = true,
perms = true,
acls = true,
owner = true,
rsh = "<ssh_key>"
}
}
server 2:
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
statusFile = "/var/log/lsyncd/lsyncd.status",
statusInterval = 1,
nodaemon = true,
insist = true
}
sync {
default.rsync,
source = "path/uploads",
target = "bitnami@<IP_server1>:/path/uploads",
delete = 'running',
--delay = 5,
rsync = {
-- timeout = 3000,
update = true,
times = true,
archive = true,
compress = true,
perms = true,
acls = true,
owner = true,
rsh = "<ssh_key>"
}
}
Can anyone help me out with this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
