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

hacksb

Registered
Jul 13, 2012
1
0
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 ?
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter

NetMantis

BANNED
Apr 22, 2012
116
1
66
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
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
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
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?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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