Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
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
add comment

1 Answer 1

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 (http://www.centos.org/modules/news/article.php?storyid=108) 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
add comment

Your Answer

 
discard

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.