Migrate dns zones from CentOS5 to CentOS7?

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
i have 4 cpanel server used or dns cluster 1 of them is the primary full cpanel server and the other three are secondary cpanel DNS-only server the primary server is a centos 5 machine
i have created a new centos 7 machine and i am using it as a full cpanel server what is the best approach that i can use to make the new machine that i have created to be the primary server of the dns cluster instead of the old centos 5 primary server that i am using now for the dns cluster
FYI the version of the cpanel on the centos 5 machine is version 56 and the cpanel on the centos 7 machine is version 78
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
also the version of the bind software version that is used in centos 5 is bind 9.3 while the bind software version that is installed on the new machine centos 7 is bind 9.9 so any suggest

i hope i get an answer as soon as possible
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
Hello @shrief mohsen

You should be able to add the new server to the cluster then use the transfer tool to migrate your accounts, once that's complete and the accounts are removed from the server/inactive you should be able to change the role of the server you migrated from to match your other DNSOnly servers.

Once your server is no longer being used as a full cPanel server you can update your license to dnsonly as well by doing the following:

Code:
touch /var/cpanel/dnsonly
/scripts/upcp
/usr/local/cpanel/cpkeyclt
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren ok after i add the new server to the cluster and transfer the accounts what about the zones is it ok if i took the copy of the zones of the old primary server and copy it to the new server and load this zones in the new server
Code:
touch /var/cpanel/dnsonly
/scripts/upcp
/usr/local/cpanel/cpkeyclt
this code will be used on the old server or the new server?
the last thing if i add the new server to the cluster what is the best approach that should i take to make the new server as the primary of the cluster

@cPanelLauren any suggestion
 
Last edited by a moderator:

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren let me make everything clear to you the old machine centos 5 cpanel server it has a full cpanel but it is used to create dns zones using dns API it doesn't have any accounts
i want to upgrade this old machine to centos 7 so i created a new centos 7 machine and installed full cpanel
to be used as dns function so
all i want to do is to transfer all the dns zones that is located in the old centos 5 server to the new centos 7 machine and make the new machine to be the primary server for the dns cluster so i was asking what is the best approach to do this

@cPanelLauren any suggestion
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
the old machine centos 5 cpanel server it has a full cpanel but it is used to create dns zones using dns API it doesn't have any accounts
If the server isn't running any actual accounts, just hosting DNS zones I would recommend using DNSOnly, there's no reason to have fully cPanel if it's not hosting accounts. For the new server, if it's just going to be another DNSOnly server you'd just want to add it to the cluster and sync the DNS zones.
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
If the server isn't running any actual accounts, just hosting DNS zones I would recommend using DNSOnly, there's no reason to have fully cPanel if it's not hosting accounts. For the new server, if it's just going to be another DNSOnly server you'd just want to add it to the cluster and sync the DNS zones.
.
@cPanelLauren since the centos 5 machine is the primary server of the dns cluster so it is a full cpanel server because full cpanel will be used for dns API unlike cpanel dnsonly server , the other 3 servers that are used are secondary servers so they are cpanel dnsonly servers the new machine that i have i want to use it instead the old primary server so it could be the new primary server of the dns cluster that will use dns API that's why i download full cpanel server on the new machine so all i want to do is to migrate the dns zones on the old server to the new one so i could make the new one the primary server in the dns cluster so i am asking what is the best approach. i hope i made it clear to you
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
If the server only has the DNS zones on it though it shouldn't be primary and you wouldn't need full cPanel. If you have Accounts or you plan to have accounts on the server then you would make it the primary server - relaying dns information to the rest of the servers in the cluster, if that's the case the instructions I provided to you first would be what you want to go with.

If this server is to be only dns zones and you're only wanting to move dns zones from one server to another just adding the new server with a DNSOnly license to the cluster would be sufficient. Guide to DNS Cluster Configurations - cPanel Knowledge Base - cPanel Documentation
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren ok does cpanel dnsonly server provides editing zones because i am using in my centos 5 machine full cpanel server to be as my primary server for the dns cluster because it has an Api that i can use to edit zones so and i want the new server that i created to do the same thing and remove the old one
is there a version on cpanel dnsonly server that i can download on the new server that has a dns api that i can use to edit zones
if i added the new server to the dns cluster and sync zones with the new server if i want to remove the old centos 5 machine from the dns cluster what is the best approach to do this
.and i am really sorry if i asked that much
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
I'm going to start by pointing out that you absolutely should not be modifying DNS zones on a server that only hosts DNS records, zone modifications should come from the webserver or you risk them being overwritten.

Can you perhaps explain your DNS cluster configuration which might help me provide you advice? Even a remedial drawing might be helpful.
.and i am really sorry if i asked that much
I would never want you to be sorry you asked. But having all the relevant information is important in helping you with your issue.
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren i am sending you an image of dns path diagram of the main primary server of the cluster and 3 secondary cpanel dnsonly servers the primary server that you will see in the image is called dns-manager.linkdatacenter.net this is a full cpanel server installed on centos 5 machine and we installed full cpanel because if for any reason we wanted to edit the zones on this server so we could use dns API of the full cpanel to edit the zones and the updated zones will be synchronized with the other 3 dns servers in the dns cluster.
so now all i want to do is to upgrade the machine of the primary server from centos 5 to centos 7 and since i can't do the upgrade on the same machine so i created a new centos 7 machine and i want to make this new machine to be the primary server of the dns cluster instead of the old centos 5 machine and i want to delete the centos 5 machine so my questions are:-

1- on the centos 7 machine since i want to use it as the primary server of the dns cluster instead of the old one centos 5 machine and i want to have the capability to edit dns zones at any time i want so do i have to install a full cpanel or is there a version of cpanel dnsonly that i can install on the new machine and it has the capability to make an edit on the dns zones through API at anytime i want

2- after i install cpanel on the new server what is the best approach i could use in order to make the new server to be the primary server of the dns cluster what is the best approach to do this so instead of using the old primary server
dns-manager.linkdatacenter.net i would use the new server which is called for example dns-manager1.linkdatacenter.net


FYI:
1-the centos 5 primary server which is named as dns-manager.linkdatacenter.net is used for dns-cluster only it doesn't have any accounts
2- the centos 7 server that will be used as the primary server of the dns cluster which for example i would call it dns-manager1.linkdatacenter.net will be used for dns-cluster only and it will not have any accounts so what is the best approach that i should take after i install cpanel on the new centos 7 machine to make the new machine the primary server of the dns cluster and delete the old centos 5 machine

3-i am uploading an image of the dns path diagram that i currently have now
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
Thank you for providing that.

That primary server, does it have accounts on it or just DNS zones? If there are no accounts on the server You'd just add it to the cluster, synchronize all zones and then set it to the same role as the CentOS 5 server.

But again, if there are no accounts on it you don't need full cPanel, the primary server in any cluster should be the webserver which hosts accounts - when accounts are added or modified the DNS zones are then synchronized to the rest of the servers in the cluster, you shouldn't be making manual edits to the zone files on a server that is clustered and only handles DNS zones.
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren after I add the new server to the cluster and synchronise zones how how to change the role of the new server to be the primary server of the cluster instead of the old centos 5 machine because when I add the new machine to the cluster it will be a secondary server to what is the best approach to make it the primary server after I add it to the cluster and synchronise zones

@cPanelLauren i hope i get a response soon

@cPanelLauren as i told you sir what is the best approach that i have to do in order to change the role of the new server that i will add to the dns cluster to be primary instead of the old centos 5 machine
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston
@shrief mohsen


Please note that this forum isn't staffed 24/7 if you feel you need an immediate response to your question I'd recommend opening a support ticket where we provide 24 hour support. Otherwise as soon as we're able to respond to your inquiry we will do our best to do so.

As far as making the new server the primary, this is all in the role of the server, You just need to set it up with the same role to the other servers as the one you're removing.
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren so all i have to do is after i add the new server to the dns cluster and synchronize records just changing the dns role of the new server to be like the old one so for example if the dns role of the old primary server is synchronize change so we should make the same in the new server as will
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren ok one last thing and i apologize if i asked a lot is it better to change the role of the new server to be as the old server and then remove the server from the dns cluster or remove first the old primary server from the cluster and then change the role of the new server to be like the old one
 

shrief mohsen

Member
Jun 26, 2019
24
1
3
cairo
cPanel Access Level
DataCenter Provider
@cPanelLauren i know that i have been asking a lot and i appreciate what you did so far and i am really sorry for this but since the situation is so critical so i want to review with you the steps that i would take in order to make the migration
1-i will add the new server to the cluster by going to the old primary centos 5 machine and adding the new server in it as a secondary server just like the other three servers and then go to the new centos 7 machine enable dns clustering and add the old centos 5 machine to the cluster in the centos 7 machine and make dns rols in the dns cluster of the centos 7 as standalone
2- going to the dns function of the old centos 5 machine press on synchronize dns zones choosing synchronize all zones to all servers and then and then press synchronize tap

3-after synchronization we go to the new centos 7 we add the secondary servers to the dns cluster make the dns role of the centos 7 machine as primary by making it synchronize change to the other 3 secondary server
4-shut down the old centos 5 machine and then taking the its IP and make this IP the IP of the new centos 7 machine

are these the best steps to do so