Combine two cPanel servers into one ?

Michaelit

Well-Known Member
Aug 5, 2015
75
9
58
Greece
cPanel Access Level
Root Administrator
Dear cPanel member,
i write this message as i would like your professional opinion. What i need to do is to combine two cPanel servers into one.
[Both of these servers are using WHM/cPanel software]. Let me explain what i would like to do.

Server1 hostname: hname.server1.com
Server 2 has the hostname: hname.server2.com. I need to use hname.server2.com point to the server's 1 hostname without change the url (no redirection).

Server 2 has two particular name servers. I need to add them to Servers1 name servers and start transferring all the account to the server1. When the process complete i am going to shut the server2 down.

Can you please guide me with the steps in order to avoid any downtime?

Thank you.
 
Last edited:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,261
313
Houston
Some downtime is almost inevitable when moving from one server to another. I would suggest following the advice listed here: How to Move All cPanel Accounts from One Server to Another - cPanel Knowledge Base - cPanel Documentation

Some things to keep in mind:

1. Once you've moved the domains over to the new server, and before you make any DNS modifications, I'd suggest ensuring that all the moved domains function as intended by modifying your local hosts file.

2. You should not add the nameservers to the new servers until you've confirmed all the domains work/function as intended

3. You'll need to add the nameservers on the new server which will most likely change the IP address associated with them. You'll also need to log in at the registrar where the nameservers were created and update the IP address associated with them in their host record.
 

Michaelit

Well-Known Member
Aug 5, 2015
75
9
58
Greece
cPanel Access Level
Root Administrator
Thank you @cPanelLauren for your mentions.
It's true that i am going to modify the local host file to ensure that all the domains moved successfully.
The question is about the hostname as i need to use both hostnames on the server that it will finally be online. I read a message where i could edit the /etc/hosts file of the server and update it with the hostname of the old server.

Example: /etc/hosts/

IP_SERVER hostname1.newserver.com hostname2.oldserver.com


Could it be done? I mean having two hostnames where i could access the new server with the hostname of the old server without any issue? [I need to access with both hostnames]
Example:
- Access to WHM: https://hostname2.oldserver.com:2087/ AND https://hostname1.newserver.com:2087/
- Access to cPanel: https://hostname2.oldserver.com:2083/ AND https://hostname1.newserver.com:2083/
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,261
313
Houston
The above response is correct, you shouldn't need to modify the server's hosts file for this as long as the IP address points to the new server you should be able to load WHM/cPanel over their respected ports
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,261
313
Houston
If you point the A record for hostname2.oldserver.com to the new server where DNS is hosted decommissioning the old server shouldn't be an issue. Unless you're not carrying the domain oldserver.com over to the new server (i.e. if the domain is hostname2.mydomain.com and hostname1.mydomain.com) - in that case, you'd need to create an A record at the registrar.