Process for Moving WHM/cPanel Server to New Hardware

DreamPhysix

Well-Known Member
Sep 30, 2009
78
0
56
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?
 

wp11b

Active Member
Feb 23, 2009
42
0
56
i'm also looking for it. support would you please explain about it.
 

MattLee

BANNED
Aug 26, 2009
83
0
56
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.
 

wp11b

Active Member
Feb 23, 2009
42
0
56
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?
 

wp11b

Active Member
Feb 23, 2009
42
0
56
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 ?
 

cPanelTristan

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

swko

Member
May 17, 2011
7
0
51
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.
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
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.
 

swko

Member
May 17, 2011
7
0
51
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello swko,

Please submit a ticket to [email protected] 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!
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,269
62
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
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.
Hello swko, I have to do the same migration work. Can you share what the cPanel people said about licensing?
 

cPanelTristan

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

Thanks!
 

lbeachmike

Well-Known Member
Dec 27, 2001
306
1
316
Long Beach, NY
cPanel Access Level
Root Administrator
/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
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?
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
23
143
Houston, TX
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?
/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.
 

lbeachmike

Well-Known Member
Dec 27, 2001
306
1
316
Long Beach, NY
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.
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.