DNSmanager Documentation

How to move DNSmanager between servers

You may need to move the panel and the license from one server to another when upgrading your hardware or when changing the license version. 

To do so:

  1. Import user data from the old server to the new one.
  2. Assign the software license to the new server. 

Step 1. Import user data

  1. Before you start the import process,  activate a separate license for the new server. Follow the installation guide to install and activate a trial version. 
  2. Import data to the new server. 

Import DNSmanager files

  1. Install DNSmanager on a new server. Select the same name server as on the old server. 
  2. Import the requires settings from the DNSmanager configuration file (the default location is /usr/local/mgr5/etc/dnsmgr.conf) to the new server. Do not copy the whole configuration file from the old server into the new one. E.g., if the operating systems differ, the paths that are used in the configuration file will differ as well. 
  3. Copy the DNSmanager databases to the new server:

    scp root@<old server IP address>:/usr/local/mgr5/etc/dnsmgr.db* /usr/local/mgr5/etc/
    scp root@<old server IP address>:/usr/local/mgr5/etc/dnsmgr_ipdb.db* /usr/local/mgr5/etc/


    4. In the following databases change the IP address of the old server into the IP address of the new one:
    • the dnsmgr_ipdb.db database→ the ips table. It corresponds to the control panel section Settings → IP-address pool → Addresses;
    • the dnsmgr_ipdb.db database → the ranges table. It corresponds to the control panel section Settings → IP-address pool;
    • the dnsmgr.db database → the namespace table.

Import files from the DNS-server

BIND is installed on the serves

  1. Copy the DNS-server configuration file into the new server:
    1. CentOS: /etc/named.conf
    2. Debian: /etc/bind/named.conf and /etc/bind/named.conf.options
  2. In the files. change the IP-address of the old server into the IP address of the new one:

    sed -i 's/\<<old server IP address>\>/<new server IP address>/g' <path to the configuration file>
    Note.
    \<<old server IP address>\> means the IP address in the angle brackets. The brackets are escaped, e.g. "\<192.168.0.1\>".
  3. Copy the domain zone files to the new server: 
    1. CentOS: /var/named/*
    2. Debian: /etc/bind/domains
  4. Clear the DNSmanager database cache on the new server: 

    rm -f /usr/local/mgr5/var/.db.cache.*


PowerDNS is installed on the servers: 

  1. Import the required settings from the PowerDNS configuration file to the new server.
    1. CentOS: /etc/pdns/pdns.conf
    2. Debian: /etc/powerdns/pdns.conf
    Do not copy the whole configuration file: if operating systems on the servers differ, paths and access details to mysql will differ as well.
  2.  Import the configuration files of the namespaces to the new server. 
    1. CentOS: /etc/pdns/pdns-*.conf
    2. Debian: /etc/powerdns/pdns-*.conf
    Note
    The configuration files of the domain namespaces contain MySQL connection details: gmysql-user — username, gmysql-password — password. Change them into the new login and password for the new server.
  3. Import the PowerDNS database to the new server: 
    1. Create a dump on the old server.

      mysqldump --databases <default name space> <user name space> > <path to the file to which the dump will be added>
      View details
    2. Copy the dump to the new server.:

      scp root@<old server IP address>:<path to the file where the dump is stored> <path to the file to which the dump will be added>
    3. Upload the database from the dump on the new server.:

      mysql <database name> < <path to the file one the new server to which the dump is copied>
      View details

Check

  1. Restart DNSmanager on the new server:

    /usr/local/mgr5/sbin/mgrctl -m dnsmgr exit
  2. Restart the DNS-server:
    • If  BIND is installed on the server:

      CentOS
      systemctl restart named
      Debian
      systemctl restart bind9
    • If PowerDNS is installed, execute the command:

      systemctl restart pdns
  3. Make sure DNSmanager is up and running.

Configure slave name servers

In the configuration files change the IP address of the old server into the IP address of the new one: 

  1. Define the required file:
    • If BIND is installed on the server:

      The configuration file on CentOS: /etc/named.conf

      The configuration files on Debian: /etc/bind/named.conf and /etc/bind/named.conf.options

    • If PowerDN is installed on the server:

      The configuration file on CentOS: /etc/pdns/pdns.conf

      The configuration file on Debian: /etc/powerdns/pdns.conf

  2. Execute the command:

    sed -i 's/\<<old server IP address>\>/<new server IP address>/g' <path to the configuration file>
    Note.
    \<<old server IP address>\> means the IP address in the angle brackets. The brackets are escaped, e.g. "\<192.168.0.1\>".

Disable the DNS-server on the old server 

Disable the DNS-server on the old server and delete it from the auto-start: 

  • BIND:

    CentOS
    systemctl stop named
    systemctl disable named
    Debian
    systemctl stop bind9
    systemctl disable bind9
  • PowerDNS:

    systemctl stop pdns
    systemctl disable pdns

Step 2. Assign the license to the new server

  1. After you have imported all the users to the new server, log in to the Client area where you ordered the license. 
  2. Delete the trial license from the client area.
  3. Open the configuration form of the commercial license and specify the IP address of the new server.
  4. If you upgrade or change the product version (eg. from ISPmanager 4 to 5 or from Lite to Business) you also need to change the tariff plan in the Client area. For more information about how to do so, please contact your license provider.
  5. Update the license file. Go to  HelpAbout program → click on Update license. Or run the command to update it manually:

    /usr/local/mgr5/sbin/licctl fetch mgrName
    Where