Move DNSmanager from one server into another

From ISPWiki
Jump to: navigation, search

This article walks you through the steps you need to perform to move DNSmanager from one server into another.

Install DNSmanager on a new server. See DNSmanager installation guide

Select the same name server as you use on the old server. For example, if your current DNSmanager works with named, select named as a name server when installing the panel on the new server.

Do not move the whole configuration file from the old server into the new one. If operating systems differ, the paths that are used in the configuration file, will differ as well. If you use specific configuration of the control panel, just add missing directives into the configuration file of the control panel on the new server.

DNSmanager keeps the information about domains and users in the sqlite database. Move the DNSmanager database into the new server.

The main database:

scp -r root@10.10.10.10:/usr/local/mgr5/etc/dnsmgr.db* /usr/local/mgr5/etc/

IP addresses database:

scp -r root@10.10.10.10:/usr/local/mgr5/etc/dnsmgr_ipdb.db* /usr/local/mgr5/etc/

Named is used as a name server

Move the configuration file and zone file

scp -r root@10.10.10.10:/etc/bind/named.conf /etc/named.conf
scp -r root@10.10.10.10:/etc/bind/* /etc/named/

Note, that location of files differ due to different operating systems on the servers. If location of zone files on the servers differ, change the paths to files in named.conf

Clear the database cache and restart DNSmanager

  rm -f /usr/local/mgr5/var/.db.cache.*
 /usr/local/mgr5/sbin/mgrctl -m dnsmgr exit

NSD is used as a name server

Move the nsd configuration file and zone files.

You may identify location of files in the DNSmanager configuration file.

scp -r root@10.10.10.10://etc/nsd3/* /etc/nsd/

Note, that location of files differ due to different operating systems on the servers.

If location of zone files on the servers differ, change the paths to files in nsd.conf

Restart DNSmanager to apply the changes

/usr/local/mgr5/sbin/mgrctl -m dnsmgr exit

PowerDNS is used as a name server

If you used specific configuration of pdns, add required directives into pdns.conf. You should not copy the whole configuration file: if operating systems on the servers differ, paths and access details to mysql will differ as well.

PowerDNS has a separate configuration file for each name space. Copy configuration files of the name space from the remote server.

scp -r root@10.10.10.10://etc/powerdns/pdns-ns_me.conf //etc/pdns/pdns-ns_me.conf

Note, that location of configuration files may vary depending on operating system.

Be sure to change the mysql access password and mysql username, if needed (use sed for bulk change) in the configuration files,

PowerDNS creates a separate database for each name space. Make a database dump.

mysqldump --databases dbname1 dbname2 dbname3 powerdns -u pdns -p > /root/dns.sql

Move the dump into the new server.

scp -r root@10.10.10.10:/root/dns.sql /root/dns.sql

Upload the dump into the new server. You can view the database password and username in the DNSmanager configuration file.

mysql -u pdns -p powerdns < /root/dns.sql

Restart DNSmanager

/usr/local/mgr5/sbin/mgrctl -m dnsmgr exit

Power off your old DNSmanager

On the old server power off the name server and disable its auto start. Delete DNSmanager from COREmanager to disable it