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.

Process for Moving WHM/cPanel Server to New Hardware

Discussion in 'General Discussion' started by DreamPhysix, Jan 7, 2011.

  1. DreamPhysix

    DreamPhysix Well-Known Member

    Joined:
    Sep 30, 2009
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    I am currently hosting a dedicated box for WHM/cPanel and am considering moving it to new hardware (including hard drive). What is the best/recommended process for moving the WHM/cPanel with accounts, configurations, etc from one hard drive to another?
     
  2. wp11b

    wp11b Active Member

    Joined:
    Feb 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    i'm also looking for it. support would you please explain about it.
     
  3. MattLee

    MattLee BANNED

    Joined:
    Aug 26, 2009
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    In general; the only supported method is using our automated migration scripts to move accounts from the old server to the new server. This requires bringing both servers online at the same time.

    Copy Multiple Accounts/Packages from Another Server

    The configuration files from services (exim, ftp, cpanel) would need to be moved over manually or re-selected through cPanel and you'd need to make sure that Apache and PHP are running identical configurations through our easyApache script but other then that, the process should be pretty smooth.
     
  4. wp11b

    wp11b Active Member

    Joined:
    Feb 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    i have tried to move the data backup user account to new machine and alls the data going backup. but i have error at package menu
    Legend
    Package that cannot be created because of limits.
    Package that can be created.

    i still need to know how to restore cpanel,apache,php,exim configuration. at backup there are "dirs" and "file"
    is it doing manually to restore?
     
  5. wp11b

    wp11b Active Member

    Joined:
    Feb 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    sory for the last reply...

    i have tried to move the backup data to new machine by doing a full backup at cpanel menu and alls the data back to normal. whether by doing this cpanel configuration,apache,php,exim also going back? because i see error at package menu cpanel.

    "Package that cannot be created because of limits.
    Package that can be created."

    and exim configuration still default not reload.

    i still need to know how to restore cpanel configuration,apache,php,exim configuration. at backup there are "dirs" and "file", whether dirs and file copied manually ?
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It appears you also opened ticket 1346454 about this same question. Whenever an already existing ticket has been opened, please let us know the ticket number on the forum whenever possible.

    Basically, you appear to want to clone the existing options for a cPanel machine such as PHP and Apache and Tweak Settings to a new cPanel server. We do have a feature request at Filed [Case 42206] Clone Server Configuration for that type of functionality to be implemented into the product later on, which you might want to post to for your input.

    To try to clone as much of the existing configuration as possible to the new machine, you could simply copy these folders or files on your old machine to the new one after making a backup of the existing files and folders prior to copying them:

    /var/cpanel/easy/apache/custom_opt_mods/
    /var/cpanel/easy/apache/prefs.yaml
    /var/cpanel/easy/apache/profile/
    /var/cpanel/easy/apache/rawenv/
    /var/cpanel/easy/apache/rawopts/
    /var/cpanel/easy/apache/state.yaml
    /var/cpanel/cpanel.config
    /var/cpanel/features/
    /var/cpanel/zonetemplates/
    /etc/exim.conf.local
    /etc/exim.conf.localopts

    Again, you would want to make a copy of these files and folders on the new machine prior to copying them from the old machine to the new one:

    Code:
    mkdir /root/backup
    cp -R /var/cpanel/easy/apache/custom_opt_mods/ /root/backup
    cp -R /var/cpanel/easy/apache/prefs.yaml /root/backup
    cp -R /var/cpanel/easy/apache/profile/ /root/backup
    cp -R /var/cpanel/easy/apache/rawenv/ /root/backup
    cp -R /var/cpanel/easy/apache/rawopts/ /root/backup
    cp -R /var/cpanel/easy/apache/state.yaml /root/backup
    cp -R /var/cpanel/cpanel.config /root/backup
    cp -R /var/cpanel/templates/apache2/ /root/backup
    cp -R /var/cpanel/features/ /root/backup
    cp -R /var/cpanel/zonetemplates/ /root/backup
    cp -R /etc/exim.conf.local /root/backup
    cp -R /etc/exim.conf.localopts
    After running the above copies, then scp or rsync the files from the old machine to the new one. At that point, you'd want to re-run EasyApache, restart exim, and restart cPanel on the machine.
     
  7. swko

    swko Member

    Joined:
    May 17, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello, sorry abaut my English but i need to do a question, when you do the migration from a server to another, it respet the configuration of the discs?? For example, If you have a RAID configuration, when you do the migration it's the same config in the new server or not??
    TKS.
     
  8. 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
    RAID configuration is an issue with the hardware and operating system, not with cPanel. cPanel does not "know" or check whether you are using a RAID or not. I may be misunderstanding your question, but if you are using RAID or LVM, this is irrelevant for the purposes of migrating cPanel accounts. The only thing that matters is which partition you have mounted as /home etc.
     
  9. swko

    swko Member

    Joined:
    May 17, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Ohh... Ok, thank's again.
     
  10. swko

    swko Member

    Joined:
    May 17, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello again, I have a question. I need to do the migration from a server to another (new) with the same configuration at lastone. I undestood all that I reeded but, I have only 1 license for one IP. The question is, can I put a free license for 15 days to do the migration, test and then put the IP with the License in my new server??
    TKS.
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello swko,

    Please submit a ticket to cs@cpanel.net to ask this issue about licensing, since the forums really cannot answer if this is possible. It would be up to our Customer Service department on whether this would be a viable option.

    Thanks!
     
  12. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,130
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello swko, I have to do the same migration work. Can you share what the cPanel people said about licensing?
     
  13. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello Kent,

    For licensing questions, the forums would not be the ideal location to inquire, since the policy may change on how licensing is handled. At all points in time, the proper location to direct licensing questions would be cs@cpanel.net

    Thanks!
     
  14. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    These details are helpful Tristan. To be sure, what does cpanel.config contain settings for? And, is /cpanel/features all of the settings from Tweak Settings?
     
  15. 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
    /var/cpanel/cpanel.config contains the settings that are displayed in the interface in Tweak Settings.

    /var/cpanel/features contains the feature lists that are defined in Main >> Packages >> Feature Manager. If you look in that directory, you will find one file for each feature list you have created in the WebHost Manager.
     
  16. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Thanks Jared. Is there documentation anywhere which details all of the cpanel config files/locations and what each is for?
     
  17. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Thanks for the details.

    A note to others - it looks like after Tweak Settings are copied manually, there is an additional manual step required for them to take effect, per the files itself -

    #### NOTICE ####
    # After manually editing any configuration settings in this file,
    # please run '/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings'
    # to fully update your server's configuration.

    Tristan - You might like to update your post as well.
     
Loading...

Share This Page