Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 one server Centos(called A) is running Apache and mysql server Now I have another one (called B) ,I set up Apache and mysql server in the same way with A. How can I synchronize the web folder and the database of server A -> server B in real time ?

share|improve this question
billyduc, if an answer was helpful to you please vote it up or accept it as the answer. That is after all the driving force for the people who spend their time answering question. – Martijn Heemels Sep 20 '09 at 15:00

For the Apache folders, why not just mount A's folder in B's filesystem? That way they'd both be looking at the same set of files with no need to sync. Alternatively, since you're using CentOS, you could try the GFS filesystem ( if simple RSync isn't enough.

For the MySQL, the best way would be replication - the relevant documentation is here.

share|improve this answer
thanks for your suggestion ! – billyduc Sep 20 '09 at 12:01
I don't like the idea of having B use the filesystem on A. That creates a huge dependency and if A ever goes down, B goes down as well. Some sort of syncing (via rsync) or clustered file system should be used. – Joshua Sep 20 '09 at 17:27
RSync would be how I would do it, but the question specified "in real time". – RainyRat Sep 20 '09 at 22:45

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.