File replication



Hi guys,

I'm new to this forum. Right now I'm working on getting my Linux LPIC-1 certification. After that I want to go to LPIC-2. To become a little more Linux proficient, I created small projects for myself to do so I learn to use Linux and related services (mostly in OpenVZ containers).

The small project I'm working on right now is to create a environment with high redundant webservers and MySQL servers. The issue I'm facing is to keep the web-files (html, css and php) for both webserver 100% equal. If I change one file on the first Apache server, I want it to be changed on the second one as well. I tried doing this with CSync2 and RSync but, as far as I could get it configured, these two only worked with cronjobs, not in a full live synchronisation.

What I would like is a DFS-style synchronisation for my webservers, both for my configuration files and my web-files. Can anyone give me a little puch into the right direction?

Thanks in advance,

I feel 3 options

1. Have NFS Share to mount the files

2. Make password less access to server and run rsync at your convenience

(Remember rsync is backup solution not real time)

3. Clustering web service and storage (so it would real time and best solution)

Its worth you test below tool

Note : I never tested above tool
Interesting, I will give that a try when I'm home. Thanks, nixsavy!
One option is glusterfs. It is something that we are testing where I work for this type of situation.
Thx for that tip as well! I'm considering all these tips and will test them. I will post my results.
First solution to keep files in sync state is "rsync". Its an instant syncing solution but to run it automatically we have to schedule a job for this using cron-job scheduling or anacron.

another one is using NFS we can keep files on sync state all the time between two computers.

Members online

Latest posts