There are two ways to transfer data from DNSmanager 5 to DNSmanager 6:

  • install DNSmanager 6 on the server with DNSmanager 5. The installation script will automatically transfer data from DNSmanager 5. The control panel will be reconfigured to work with DBMS MySQL and the DNS server; 
  • install DNSmanager 6 on the new server and transfer a DNSmanager 5 database dump.

When you upgrade to DNSmanager 6, your branding settings are not saved.

Preparation


Supported OS

If you plan to install DNSmanager 6 on a server with DNSmanager 5, make sure that DNSmanager 6 supports the server OS. Read more in Server requirements.

If the OS is not supported, transfer the control panel to a server with a supported OS following the instruction in the DNSmanager 5 documentation.

Licensing

To install DNSmanager 6, you need a license key. If you purchased DNSmanager 6 from ISPsystem, you can view this information in your personal account at eu.ispsystem.com in the Licenses section → select DNSmanager 6 license → LIcense key field .

Disabling DNSSEC

The current version of DNSmanager 6 does not support DNSSEC secured domains migration. To disable protection:

  1. Delete all DS records from the parent domain zone.
  2. No earlier than two hours after that, delete the domain zone signatures: Account Management Domain names → select the domain → Edit button → enable the Delete sign option → Ok.
  3. Disable DNSSEC support: Settings Global settings → disable the DNSSEC support option → Ok.

Installing DNSmanager 6 on the server with DNSmanager 5


Install DNSmanager 6 following the instructions in the article Installation. If the following message is displayed: DNSmanager5 found. Do you want to migrate data from it to DNSmanager6?(y/N), press y

Installation script performs the following:

  1. Installs DNSmanager 6 and additional software packages.
  2. Blocks DNSmanager 5.
  3. Creates a dump of the database and all namespaces from DNSmanager 5. The dump is saved in the directory /opt/ispsystem/dnsmanager6/dump/.
  4. Imports the database dump into DNSmanager 6 and clears the database cache.
  5. Restores namespaces from the dump.

A new ihttpd server is installed for DNSmanager 6. After installation, reissue the Let's encrypt certificate or reinstall the existing one if you used a commercial certificate.

Transferring a DB dump to the server with DNSmanager 6


  1. On a server with DNSmanager 5:
    1. Prepare a dump generation utility:
      1. Install the utility build software:

        yum install coremanager-devel
        BASH
      2. Download the source code of the utility and build it:

        cd /usr/local/mgr5/src && \
        wget https://download.ispsystem.com/extras/dnsmanager/backuptool.tar.gz && \
        tar -xvf backuptool.tar.gz && \
        cd /usr/local/mgr5/src/backuptool && \
        make centos-prepare && \
        make dist DISTDIR=/usr/local/mgr5
        BASH
    2. Generate a dump:

      1. Block the control panel:

        /usr/local/mgr5/sbin/mgrctl -m dnsmgr -l
        BASH
      2. Start the dump generation:

        /usr/local/mgr5/sbin/backuptool --command dump --dump-dir /usr/local/mgr5/dump
        BASH
      3. Unblock the control panel:

        /usr/local/mgr5/sbin/mgrctl -m dnsmgr -u
        BASH
    3. Copy the contents of /usr/local/mgr5/dump/ directory to the /opt/ispsystem/dnsmanager6/dump/ directory of the server with DNSmanager 6.
    4. Copy the config file /usr/local/mgr5/etc/dnsmgr.conf to the /opt/ispsystem/dnsmanager6/etc/ directory of the server with DNSmanager 6.
    5. Copy all files from the /usr/local/mgr5/var/userconf/ directory to the /opt/ispsystem/dnsmanager6/var/userconf/ directory of the server with DNSmanager 6.
  2. On a server with DNSmanager 6:

    1. Remove, if present, from the configuration file /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf:
      1. parameters of PowerDNS connection — PdnsConfigDir, PdnsDBHost, PdnsDBUser, PdnsDBPassword;
      2. parameters of DB connection — DBType, DBHost, DBUser, DBPassword, DBName.
    2. The dump files contains the IP addresses of the server with DNSmanager 5:
      • to use the new IP addresses, replace the old IP addresses with the new ones in all dump files: db.dump.sql, dns.dump.json, ipdb.dump.sql;
      • to migrate IP addresses to a new server with DNSmanager 6, do not change them in the dump files.
    3. Block the control panel:

      /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -l
      BASH
    4. Prepare the database:

      mysql -e 'DROP DATABASE dnsmgr; CREATE DATABASE dnsmgr'
      BASH
    5. Restore the dump:

      /opt/ispsystem/dnsmanager6/sbin/backuptool --command restore --dump-dir /opt/ispsystem/dnsmanager6/dump
      BASH
    6. Delete the DB cache:

      rm -rf /opt/ispsystem/dnsmanager6/var/.db.cache.*
      BASH
    7. Unblock the control panel:

      /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -u
      BASH
    8. For the first namespace, we recommend using the default view pdns. To do this, change the IP address in the dump/dns.dump.json file to the first IP address of the interface:

      dump/dns.dump.json

      [
         {
            "allowtransfer" : "127.0.0.1 185.48.237.3",
            "destip" : "1.1.1.1", // IP-адрес view по умолчанию
            "enabled" : true,
            "name" : "reseller.ru", // имя view по умолчанию
            "zones" : [
            	...
            ],
            ...
         }
      ]
      BASH
    9. Add parameters to etc/dnsmgr.conf to use the default view first namespace from dump/dns.dump.json:

      DefViewUsable yes
      DefViewAlias reseller.ru
      CODE
    10. Run the data recovery of the DNS server:

      /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns bind_ip=on
      BASH

      The recovery time depends on the number of namespaces and can take from a few seconds to an hour.

  3. Block the control panel on the server with DNSmanager 5:

    /usr/local/mgr5/sbin/mgrctl -m dnsmgr -l
    BASH

Actions after migration


License activation

Log in to the control panel using the URL https://<your_domain>:1501/dnsmgr and enter the license key.

Verifying namespaces

  1. Check the status of running namespaces:

    Default namespace

    systemctl status pdns
    CODE

     

    Users namespaces

    systemctl status "pdns@*"
    CODE

    If the services are stopped, start them:

    Default namespace

    systemctl start pdns
    CODE

    Users namespaces

    systemctl start "pdns@<view>"
    CODE

    <view> — namespace

  2. If the output of the command contains errors, run diagnostics with the journalctl utility:

    journalctl -xe
    CODE
  3. To fix the errors, check that the PowerDNS configuration files are correct and restart the namespaces:

    Default namespace

    systemctl start pdns
    CODE


    Users namespaces

    systemctl start "pdns@<view>"
    CODE

    <view> — namespace

Verifying DNS records

  1. Check for errors when migrating DNS records:

    zgrep "got error while restoring" var/dnsmgr.log
    CODE
    zgrep "got error while restoring" var/logs/dnsmgr.log*
    CODE
  2. Enter the records or zones from the error message manually through the DNSmanager control panel interface.

    error example

    Aug 24 03:50:05 [12784:12] dnsmgr WARNING got error while restoring record 'fft.ru.' for zone 'fft.ru': Type: 'exists' Object: 'dns_record' Value: 'fft.ru. TXT  v=spf1 redirect=_spf.yandex.net'
    CODE

Possible errors


ERROR notconfigured(def_view_no_action): An error occurred while executing the request

This error may occur at the stage of database conversion or when restoring the DNS server data. The error means that there is a namespace in the dump that will run on the default server IP address and will be considered the default namespace.

Solution:

  1. Determine the default server IP address:

    ip addr
    CODE

    Example output

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether aa:bb:cc:dd:ee:ff brd ff:ff:ff:ff:ff:ff
        inet 172.31.48.152/32 brd 172.31.48.152 scope global noprefixroute eth0
           valid_lft forever preferred_lft forever
        inet 172.31.48.153/32 brd 172.31.48.153 scope global noprefixroute eth0
           valid_lft forever preferred_lft forever
    CODE

    Save the first IP address from the network interface settings. In the example above, it is IP address 172.31.48.152.

  2. Find the saved IP address in the destip parameter of /opt/ispsystem/dnsmanager6/dump/dns.dump.json file.

    Example file

    [
       {
          "allowtransfer" : "127.0.0.1",
          "destip" : "172.31.48.152",
          "enabled" : true,
          "name" : "ns.example.com",
          "zones" : [
    ...
    CODE

    Save the name parameter for this IP address. In the example above, it is ns.example.com.

  3. Add the following parameter to the /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf config file

     DefViewUsable yes
     DefViewAlias <name> 
    CODE

    <name> — saved value of the name parameter

  4. Restart the control panel:

    /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -R
    BASH
  5. Restart the recovery process:
    • if you are installing DNSmanager 6 on the server with DNSmanager 5:

      /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns
      BASH
    • if you are transferring a DNSmanager 5 database dump:

      /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns bind_ip=on
      BASH
  6. Restart the control panel:

    /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -R
    BASH

ERROR missed(ips)

This error may occur when restoring the DNS server data.

Example error

ERROR missed(ips):  with  '192.168.1.1' does not exist
CODE

192.168.1.1 — non-existing IP address

Solution:

  1. In the /opt/ispsystem/dnsmanager6/dump/dns.dump.json file, remove the IP address contained in the error text from the destip parameter. For example, the destip parameter is:

    "destip": "192.168.1.1 192.168.2.2"
    CODE

    If the error contains the IP address 192.168.1.1, the parameter should be changed to:

    "destip": "192.168.2.2"
    CODE
  2. Restart the recovery process:

    /opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns bind_ip=on
    CODE

Trying restore DNS from dump

If restoring DNS server data ends on the Trying restore DNS from dump line and the control panel terminates, it means that the server does not have enough RAM to perform the operation.

Solution: increase the amount of RAM on the server.

Diagnostics


DNSmanager 5 log files

  • /usr/local/mgr5/var/backuptool.log dump generation utility.

DNSmanager 6 log files

  • /opt/ispsystem/dnsmanager6/var/dnsmgr.loginstallation script;
  • /opt/ispsystem/dnsmanager6/var/backuptool.logdump generation utility.