-
-
Save gelato/18f36038ae6d94047867f00e6b71ab1e to your computer and use it in GitHub Desktop.
Multiple Server, Host Lsync Config 2016
This file contains hidden or 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