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.

Is there a Site Copy or DR Script ?

Discussion in 'General Discussion' started by Smokier, Nov 19, 2008.

  1. Smokier

    Smokier Registered

    Joined:
    Apr 29, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Greetings,
    I have customer who wants a DR solution for thier cpanel site. We have Cpanel servers in different data centers, but need something that can be run nightly, hourly, whatever and transfer all data from one to the other.

    The WHM site copy utility would be perfect, except that it is a one time use. It balks when an account already exsists.

    So, I have a need to dump, replicate and restore a complete site at a regular interval. MySQL DBs, mail accounts, passwds, web content, etc. A complete site copy from one CPanel server to another.

    Any ideas? Suggestions, pointers? Is this already a feature or available script? What is this service or feature called?

    TIA

    Smokier
     
  2. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    One command comes to mind - rsync.

    1. Install a SSH key on the remote system.
    2. Issue multiple rsyncs to sync mySQL, mail and public_html data over to "server2".

    Copy WWW data:
    Code:
    rsync -ave ssh --delete /home/user/public_html root@server2:/home/user/public_html
    Copy mySQL data:
    Code:
    rsync -ave ssh /var/lib/mysql/user* root@server2:/var/lib/mysql/
    Copy Mail data:
    Code:
    rsync -ave ssh /home/user/mail/* root@server2:/home/user/mail/
     
Loading...

Share This Page