Skip to content

Instantly share code, notes, and snippets.

@tjstein
Created August 29, 2011 16:26
Show Gist options
  • Save tjstein/1178763 to your computer and use it in GitHub Desktop.
Save tjstein/1178763 to your computer and use it in GitHub Desktop.
lsyncd conf for multiple targets
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
@Taisgeal
Copy link

Taisgeal commented Dec 21, 2016

Yes, that works fine. Thank you very much.

@thanhkhanhcntt
Copy link

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. ?

@josepato
Copy link

josepato commented May 2, 2018

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

@pdostal
Copy link

pdostal commented May 14, 2018

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