Created
August 29, 2011 16:26
-
-
Save tjstein/1178763 to your computer and use it in GitHub Desktop.
lsyncd conf for multiple targets
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 = { | |
delay = 1, | |
maxProcesses = 3, | |
logfile = "/var/log/lsyncd.log", | |
} | |
targetlist = { | |
"10.0.1.24:/var/www/thomasjstein.com", | |
"10.0.1.26:/var/www/thomasjstein.com" | |
} | |
for _, server in ipairs(targetlist) do | |
sync{ default.rsync, | |
source="/var/www/thomasjstein.com", | |
rsyncOps="-rltvupgo" | |
target=server | |
} | |
end |
Maybe mine is what you are looking for
https://gist.github.com/oscarssama/8bc223c8100890f71a07a5a6dc16a7f6
This "sync" all the content of the lsync server to the everyserver in targetlist...
Yes, that works fine. Thank you very much.
I'm setting up an auto scale system. I don't know which IP will be created, I just know subnet. Example, a new server created would have IP 10.220.204.x.
Could you please help me to sync code to all servers after they were created. ?
Hi @oscarsmx , I see the link you post return a 404, can you share it again?
I'm trying to setup a 3 node cluster and I need some files to be sync. I'm trying to archive a master-master kind of configuration
Yes, I'd like to see @oscarsmx's example as well 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't work as it stands. It only works for the first server in the targetlist pair.
I am using default.rsyncssh, if that helps.