Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cluster of Ubuntu 12.04 web servers running a lamp stack. All of these servers are connected to a Load Balancer on Amazon Web Services.

What I want to be able to do is have a dedicated Ubuntu server that I can update the PHP files on and have the other web servers check with cron to get the updates files from the repository. They don't have to use cron but that was the only thing I could think of, unless there was a way to have the updated repository tell them that it has updated files. And then how to transfer those files.

Also if there is a ways for a server to check for updated files when it boots because I am going to be using auto scaling on AWS so when there is an increase in the load and another server gets created I need it to download the updated files from the repository when launched.

Not sure how to transfer files from server to server.

share|improve this question
up vote 0 down vote accepted

Seems like rsync/cron would work just fine.

If you want to get frisky, you can set up GlusterFS to replicate changes around the cluster automatically.

share|improve this answer
I tried GlusterFS and had no luck at all with it :( – Yamartino Nov 13 '12 at 3:38
Rely less on luck and more on reading the docs. – ceejayoz Nov 13 '12 at 4:52

Looks like you already got a hit on your question a few minutes ago :-). I was thinking something along the lines of rsync too as EEAA is suggesting above because I remember watching a YouTube video about that. I'll try to track down that video link for you.

Also, I think keeping autoscaled EC2s in sync with the current webapp files is another benefit the AWS Elastic Beanstalk service offers in that when it autoscales based on load, as you describe you have a need for, the new instances spun up download the most current php files that were running before the autoscale occurred. I think this is because Elastic Beanstalk uses a repository that is separate from your running instances.

share|improve this answer
Yeah, I always go to Elastic Beanstalk but I always find reasons against it, I think it is because the customization I can do with an all home made stack. Although it does sound nice... I am not sure exactly. I will check out rsync though, do you know if there is a cron job or something that can be triggered when a server is spun up? – Yamartino Nov 13 '12 at 3:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.