Created
December 7, 2016 07:23
-
-
Save oscarsmx/8bc223c8100890f71a07a5a6dc16a7f6 to your computer and use it in GitHub Desktop.
Multiple Server, Host Lsync Config 2016
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings { | |
logfile = "/var/log/lsyncd/lsyncd.log", | |
statusFile = "/var/log/lsyncd/lsyncd-status.log", | |
statusInterval = 10 | |
} | |
-- Slaves | |
targetList = { | |
"127.0.0.1", | |
"127.0.0.2", | |
"127.0.0.3" | |
} | |
-- Sync Conf | |
--- Exclude work at source level | |
for _, servers in ipairs(targetList) do | |
sync { | |
default.rsyncssh, | |
source = "/home/nginx/domains/oscars.mx/public", | |
exclude = { | |
'/_tmp/', '/_cache/' | |
}, | |
host = servers, | |
targetdir = "/home/nginx/domains/oscars.mx/public/", | |
rsync = { | |
compress = true, | |
owner = true, | |
perms = true | |
}, | |
ssh = { | |
port = 2233 | |
} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment