Search Engine: Elastic

Article ID: 124366, created on Feb 3, 2015, last review on Feb 3, 2015

  • Applies to:
  • H-Sphere 3.6.3


How to move H-Sphere DNS server which crashed to a new physical server with a new IP address?


Crashed DNS server


NOTE: DNS servers can be moved only to Linux/Unix boxes. You can't move DNS to a Windows platform.

Main idea of DNS moving is to move OLD Logical server to NEW Physical server.

  1. Using E.Manager, create a new physical server and add the DNS server group (or add this group to the physical server you are planning to move DNS server to).
  2. Prepare a new box with DNS using Parallels H-Sphere installer. (require to have all packages installed only)
  3. Stop the Control Panel.
  4. Log into the system database and run the following DB queries:

    update l_server set p_server_id=[new_p_server_id] where id=[id_of_OLD_DNS_logical_server];
    update l_server_ips set ip='[new_DNS_server_IP]', mask='[new_DNS_server_mask]' where l_server_id=[id_of_OLD_DNS_logical_server] and flag=4;
    select * from l_server_ips where l_server_id=[id_of_OLD_DNS_logical_server] and flag in (5,6);
  5. Move all IPs selected from Parallels H-Sphere database (with flags 5 and 6) to the new server. This means that you need to remove these IPs from the network interface on the old DNS server, /etc/named.conf ("Listen on" directive) and /hsphere/local/network/ips files, and set them on new server (on network interface, /etc/named.conf and /hsphere/local/network/ips files).
  6. Perform this step ONLY if you are running two DNS servers on one box and are separating them. This must be done on the source server.

    Go to the directory /hsphere/shared/scripts/MultiDNS/ and copy its contents one level higher overwriting the target files:

    # cd /hsphere/shared/scripts/MultiDNS/
    # cp ./* ../
  7. Move DNS data. You can choose between two possibilities: physical move or recreation of DNS zones.

    • Physical move:

      1. Move the /hsphere/local/var/named directory from old DNS server to the new server.
      2. Change the ownership of moved files to named:named:

        chown -R named:named /hsphere/local/var/named
      3. On the rest of DNS servers, for slave zones which had masters set to the old DNS server IP, change it to the new DNS server IP (using sed or any other method).

      4. Restart named.
    • DNS recreation tool:

      1. Log into your CP server as the cpanel user.

      2. Execute the following command (it may take a while if you have many DNS zones):

        java -m db -dz
  8. Start the Control Panel. You can safely delete the unused Logical DNS server created in step 2.

  9. Change the IP in A DNS record for the DNS server in the service DNS zone (using the Control Panel).

6b908665c0d1eca5bdd0141a32fd712a 6311ae17c1ee52b36e68aaf4ad066387 f213b9fa8759d57bee5d547445806fe7 2e39a5e5b1423cc126cf735bac076008

Email subscription for changes to this article
Save as PDF