The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fully Synced Cpanel Servers

Discussion in 'Data Protection' started by joaquimsa, Mar 12, 2014.

  1. joaquimsa

    joaquimsa Registered

    Joined:
    Jun 17, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've been reading severall posts regarding this issue, and in some of them i found ideas in how to achieve what i describe below

    Basically i want to have 2 mirrored cpanel servers fully synced and where each one can serve the websites requests at any time.
    I'm removing the Mysql from the equation since i plan to use an remote cluster for the effect.
    Also DNS would be external.

    So basically we get left with syncing files and cpanel configurations. Knowing the needed files it would be quite easy to cron an rsync or even creating a live sync service.

    However i have a doubt that is regarding the different IP that the servers would have.
    How can we sync all definitions of the services and keep aware that we would have different IPs in each server, so configurations must reflect that? I',m imagining problems on apache confs probably .


    Thanks in advance for any insights on these one.

    J. Sa
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    Do you really need to sync configurations, as opposed to just syncing website content?
     
  3. joaquimsa

    joaquimsa Registered

    Joined:
    Jun 17, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Users will have acess to the control panel , no matter the server active at the moment . Changes done in the user account must be replicated .
    Also if a new account is added it must exists in both servers, i guess we need to sync cpanel configurations , users files, etc.
     
  4. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    In that case, you'll probably need to wrap rsync around a script, and have the script adjust the configuration after the sync is done, or skip certain files that would be dangerous to copy.
     
  5. joaquimsa

    joaquimsa Registered

    Joined:
    Jun 17, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Seems the right direction, in fact doing an IP replace on the files after the sync and rebuilding apache seems a light and simple operation.

    I will start doing some tests.

    Thanks a lot.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    we sync one of our servers across data centers
    /usr/bin/rsync -vrplogDtH -e "ssh -p#" --delete --exclude=virtfs/ --exclude=sites_we_dont_want_to_replicate/ /home/ root@IP:/home

    DNS is hosted elsewhere round robin
    Databases are dumped and loaded on the fall over server every 15 minutes (good enough for what we are using it for)
    the rsync every hour (good enough for what we are using it for)

    both servers are configured exactly the same works like a charm
    the mail settings do not change from server to server so we do not need to sync that
    but you could sync some of the configs over just as well (only the things that change )
     
Loading...
Similar Threads - Fully Synced Cpanel
  1. Valetia
    Replies:
    3
    Views:
    1,021

Share This Page