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.

Mirroring a cpanel account

Discussion in 'General Discussion' started by bleachga, Apr 1, 2010.

  1. bleachga

    bleachga Member

    Joined:
    Nov 14, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I have two servers running WHM/cpanel. The second server is supposed to function as a backup server for the first one, in case the first one crashes or otherwise becomes unavailable.

    I'm using rsync to mirror the website nightly, and mysqldump to backup the critical databases. I can't use the cpanel export/import method; the website is simply too large to transfer every night; rsync solves that problem nicely.

    My question: is there a guide somewhere on how I can move things like email accounts, forwarders, mailing lists, protected web directories, etc.? Or, is there an easy way to accomplish what I'm trying to accomplish?
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Do you want the second server as the exact replica of the first one OR you are just looking to create backups on the second server and then extract it whenever needed? If you are looking to setup the second server as it is, rsync the following directories from the first server:

    /home
    /var/lib/mysql
    /usr/local/apache/conf
    /var/named
    /etc/*named*
    /etc/rndc.conf
    /etc/rndc.key
    /usr/local/cpanel/3rdparty/mailman
    /var/log/bandwidth
    /var/spool/cron
    /var/cpanel
    /var/cpanel/cpanel.config
    /usr/local/cpanel/etc/cpanel.config
    /etc/remotedomains
    /etc/ssldomains
    /etc/userdomains
    /etc/localdomains
    /etc/domainusers
    /etc/valiases
    /etc/vfilters
    /etc/proftpd*
    /etc/pure-ftpd*
    /etc/passwd
    /etc/group
    /etc/shadow
    /etc/cpupdate.conf
    /etc/ssl
    /etc/true*
    /etc/wwwacct.conf
     
  3. Rick C

    Rick C Member

    Joined:
    Aug 19, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hi I am looking to do this
    so this would mirror the whole cpanel server?

    So what is the best way to go about this?

    I have 1 cpanel server, do i just setup a 2nd server install cpanel then rsync the above and it will pull all the accounts over or do i need to copy them over?

    can i rsync the whole lot in one command?

    Would this do databases also?

    Thanks

    Rick
     
    #3 Rick C, Apr 9, 2010
    Last edited: Apr 9, 2010
  4. bleachga

    bleachga Member

    Joined:
    Nov 14, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    madaboutlinux:

    I'm not trying to replicate the whole server, just one or two domains. Your answer did give me what I was looking for: the "magic" locations where the Linux and WHM/cpanel config files live.

    Thanks!

     
  5. xerophyte

    xerophyte Well-Known Member

    Joined:
    Mar 16, 2003
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    For the database you can setup mysql replication, so it will be synced real time
     
Loading...

Share This Page