Skip to main content

Migrate dns zones from CentOS5 to CentOS7?

Comments

26 comments

  • shrief mohsen
    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
    0
  • cPanelLauren
    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: touch /var/cpanel/dnsonly /scripts/upcp /usr/local/cpanel/cpkeyclt
    0
  • shrief mohsen
    @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
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    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.
    0
  • shrief mohsen
    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
    0
  • cPanelLauren
    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
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    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.
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    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.
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    @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.
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    Yes, as long as it only hosts DNS records this would be fine.
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    I'd add it to the cluster, synchronize the records, remove the old server and change the role on the new one to replace the old one.
    0
  • shrief mohsen
    @cPanelLauren thank you so much for your effort
    0
  • shrief mohsen
    @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
    0
  • cPanelLauren
    That sounds right, the biggest things you want to make sure of are 1. That the new server has all the zones 2. That the new server has the same DNS role to the other servers as the old one Other than that there really shouldn't be too much more too it - as far as moving the IP address - any time you do a swap like this you'll want to ensure that you have a qualified system administrator or your provider assisting to ensure this goes smoothly.
    0
  • shrief mohsen
    @cPanelLauren 1-in case that the new server didn't get all zones so what is the best approach to make sure that the new server receives all the zones 2-if we change the roles of the server to act as a primary but something wrong happens and it is not working so what is the best approach to fix this
    0
  • cPanelLauren
    -in case that the new server didn't get all zones so what is the best approach to make sure that the new server receives all the zones

    Technically, it should if you're synchronizing the zones, what I mean here is that there are no errors or issues with synchronization.
    -if we change the roles of the server to act as a primary but something wrong happens and it is not working so what is the best approach to fix this

    I'm not sure how that would happen but it'd really depend on what went wrong, this is a really simple modification and really just need to ensure that this server is the one passing the zone files to the others and not the other way around.
    0
  • shrief mohsen
    Dear @cPanelLauren the primary dns server named.conf is different from the secondary servers located on the cluster i have found that no of domains located on the primary nameserver are less than the secondary nameservers on the dns cluster and the named.conf file of one of the secondary servers has more domains than the other anyway named.conf on the dns servers of the dns cluster are not the same is there any approach to solve this problem Thanks & best regards
    0
  • cPanelLauren
    I would have no way to know what the issue is specifically without more information. Do the zones on the DNS server relate to accounts that exist on the webserver? Are they older zones related to removed accounts?
    0
  • shrief mohsen
    @cPanelLauren will i have checked the number of zones for each name server each zone should be located in the named.conf as external and internal zone i am using the command rndc status to check the number of zones for each server and her is the output primary server of dns cluster number of zones :-12900 secondary server 1 number of zones:-12937 secondary server 2 number of zones:-13114 i have found at the primary servers that some zones of some domains located in the named.conf file of the primary server have only internal zones other domains have only external zones when i check this domains i see that most of them are active so all the dns servers named.conf files are not synchronized with each other so what is the best approach for this problem Thanks & best regards
    0
  • cPanelLauren
    The secondary servers are nameservers only correct? They do not host any domains on them? This would be the optimal way to set this up. The only thing you would need to ensure is that ALL of the domain zones on the Primary server are present on the secondary servers in this case, it does not matter if zones present on the secondary server are not synchronized to the primary or other secondary servers.
    0

Please sign in to leave a comment.