File replication

Discussion in 'General Server' started by DaSt1986, Jul 12, 2013.

  1. DaSt1986

    DaSt1986 New Member

    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    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,
    Daryl
  2. nixsavy

    nixsavy Member

    Messages:
    65
    Likes Received:
    17
    Trophy Points:
    8
    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

    http://www.cis.upenn.edu/~bcpierce/unison/

    Note : I never tested above tool
  3. DaSt1986

    DaSt1986 New Member

    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Interesting, I will give that a try when I'm home. Thanks, nixsavy!
  4. grim76

    grim76 Active Member Staff Writer

    Messages:
    177
    Likes Received:
    48
    Trophy Points:
    28
    One option is glusterfs. It is something that we are testing where I work for this type of situation.
    Rob likes this.
  5. DaSt1986

    DaSt1986 New Member

    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Thx for that tip as well! I'm considering all these tips and will test them. I will post my results.
  6. anubhav tiwari

    anubhav tiwari New Member

    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    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.

Share This Page