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.

How to move all date of WHM/cPanell to a new server

Discussion in 'General Discussion' started by hacksb, Jul 13, 2012.

  1. hacksb

    hacksb Registered

    Joined:
    Jul 13, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I have a dedi server which host website using whm/cp,and i wan to rent a new dedi to replace which one i am using.

    So i need to move all data all thing of whm to that new server.

    Who can tell me ,how can I move ?
     
  2. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
  3. NetMantis

    NetMantis BANNED

    Joined:
    Apr 22, 2012
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Utah
    cPanel Access Level:
    DataCenter Provider
    WHM is good to move a couple of accounts but after that I really wouldn't recommend it for a lot of account.

    The problem is WHM is VERY SLOW transferring accounts and gets even longer when there is a lot of accounts.

    You would be much better off, manually running "/scripts/pkgacct username" against all users on your server using the Linux shell directly and then manually transfering the /home/cpmove-*.tar.gz files to the new server via either rsync or rcp.

    For servers with a great many accounts, this method is generally 10x to 20x faster than WHM's interface!

    You can automate the backing up the sites process a bit --
    (just a simple shell script example to package all your accounts for transfer at once):
    Code:
    #!/bin/bash
    IFS="$"
    
    cd /home
    
    find /var/cpanel/users -type f | cut -d'/' -f5 | grep -v "root\|system\|cpanel\|-" | while read ACCT; do
         if [ -d "/home/${ACCT}/public_html" ]; then
               /scripts/pkgacct "${ACCT}"
         fi
    done
    
     
  4. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    yeah..I agree..no GUI can beat the power of CLI :D

    @hacksb - if you are much techie to understand what is going on, how to identify and fix issues and how to control stuff via CLI, Netmantis's method is good ( otherwise you will have to spend more time than using GUI ). But if would like to leave all the hassle to cPanel without bothering what it is necessary to do to transfer the accounts, use GUI. It has a nice interface and all are self explanatory and I haven't meet any serious issue with iit yet :)

    How much data you need to transfer?
     
  5. 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
    The following post details manually moving all accounts in a loop and then restoring all in a loop on the new server:

    http://forums.cpanel.net/f5/issue-when-transfering-accounts-271081.html#post1137631

    The benefit of this process is that you would have a file with all the usernames in it and could use that file for restoring on the new machine. The prior post in this thread only gets a loop for packaging the accounts. That same script cannot be used to restore those accounts.

    If you also need to move the settings, this post details how to move the most important settings:

    http://forums.cpanel.net/f5/process-moving-whm-cpanel-server-new-hardware-184192.html#post831162
     
Loading...

Share This Page