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.

Transfer cpanel configurations to new server

Discussion in 'Data Protection' started by jaytay, Mar 27, 2014.

  1. jaytay

    jaytay Member

    Joined:
    Jan 9, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    So I am moving my server and I want to get all the WHM/cPanel/Easy Apache etc. configurations to also be transferred to the new server.

    Someone told me "rsync" would do this.

    I have never used this "rsync" command and not sure what to do. Or if their is a better way,

    Anyone you expertise is greatly appreciated. ;)

    Thanks In Advance ;)
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can copy /etc/wwwacct.conf and /var/cpanel/cpanel.config, as well as the EasyApache build profile, to the new server. This will copy most of your important server settings, and will make sure that cPanel and Apache are configured the way they are on the old server. Once this is done, use our cPanel transfer tools to transfer your accounts to the new server.

    I want to mention that there are many how-to guides online in forums, blogs and other sources that recommend using rsync to copy all of your files from one server to another. Please do not do this. Using rsync sounds great in theory, but in reality, it almost always ends up copying bad configurations and even corrupt files. We see many problems caused by following tutorials that involve rsync. We do not recommend or endorse any solution involving rsync, and we cannot support any damage that may be done by using rsync to copy files indiscriminately between servers.

    Our installation documentation actually addresses this subject in some detail:

    http://go.cpanel.net/1926advanced

    You can copy /var/cpanel/cpanel.config on the old server to /root/cpanel_profile/cpanel.config before you even install cPanel on the new server. If cPanel is already installed on the new server, simply copy /var/cpanel/cpanel.config from the old server to /var/cpanel/cpanel.config on the new server. Use scp or any other method you are comfortable with to copy the file. Then, copy /etc/wwwacct.conf from the old server to the new server. These two files contain the majority of the settings in your WebHost Manager and cPanel configuration.

    You can also copy your EasyApache build profile, so that Apache and PHP will be built on the new server just like on the old server. The following section of our documentation explains how to do this:

    http://go.cpanel.net/preapache

    You can copy the EasyApache build profile either before or after you install cPanel on the new server. If you do it after cPanel is installed on the new server, remember that you will need to run EasyApache separately so that Apache and PHP will be built with the profile you copied.

    Once the cPanel settings have been copied and EasyApache has been run with your build profile, you can use our transfer tools to copy your accounts. On the new server, in the WebHost Manager, click Main » Transfers » Copy multiple accounts/packages from another server. The new server will log into your old server, package your accounts, and copy them over. The transfer tool is documented here:

    http://go.cpanel.net/1926copymulti

    I hope this helps you. Please let us know if you have any questions.
     
    Infopro likes this.
  3. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Also, /usr/local/cpanel/bin/cpconftool will back up and restore the Exim configuration and Tweak Settings. The Tweak Settings are mostly stored in /var/cpanel/cpanel.config, so this does overlap some of the information I mentioned in my previous post, but I wanted to mention it because it could be helpful to you. Here is the usage:

    Code:
    /usr/local/cpanel/bin/cpconftool --help
    /usr/local/cpanel/bin/cpconftool [--restore=file|--backup|--list-modules] [--modules=MODULE,MODULE,MODULE]
    When you run it with the --backup argument, it will create a tarball (.tar.gz file) that you can copy to the new server and restore using the --restore= argument. This tool only works with Tweak Settings and the Exim configuration at this time, so for other data like EasyApache profiles, you will still need to use the methods I described in my previous post.
     
  4. jaytay

    jaytay Member

    Joined:
    Jan 9, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thankyou,
    I have not moved forward with new server just yet waiting fir it to be built I dont have cpanel on it i was gonna do that after i knew the info that you just gave me.

    thanks for letting me know that rsync isnt the best way.



     
Loading...

Share This Page