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.
- 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).
- Prepare a new box with DNS using Parallels H-Sphere installer. (require to have all packages installed only)
- Stop the Control Panel.
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);
- 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/ipsfiles, and set them on new server (on network interface,
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 ./* ../
Move DNS data. You can choose between two possibilities: physical move or recreation of DNS zones.
- Move the
/hsphere/local/var/nameddirectory from old DNS server to the new server.
Change the ownership of moved files to named:named:
chown -R named:named /hsphere/local/var/named
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).
- Restart named.
- Move the
DNS recreation tool:
Log into your CP server as the cpanel user.
Execute the following command (it may take a while if you have many DNS zones):
java psoft.hsphere.tools.DNSCreator -m db -dz
Start the Control Panel. You can safely delete the unused Logical DNS server created in step 2.
- Change the IP in A DNS record for the DNS server in the service DNS zone (using the Control Panel).