Migration from DNSmanager 5 to DNSmanager 6
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:
- Delete all DS records from the parent domain zone.
- 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.
- 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:
- Installs DNSmanager 6 and additional software packages.
- Blocks DNSmanager 5.
- Creates a dump of the database and all namespaces from DNSmanager 5. The dump is saved in the directory /opt/ispsystem/dnsmanager6/dump/.
- Imports the database dump into DNSmanager 6 and clears the database cache.
- Restores namespaces from the dump.
Transferring a DB dump to the server with DNSmanager 6
- On a server with DNSmanager 5:
- Prepare a dump generation utility:
Install the utility build software:
yum install coremanager-devel
BASHDownload 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
Generate a dump:
Block the control panel:
/usr/local/mgr5/sbin/mgrctl -m dnsmgr -l
BASHStart the dump generation:
/usr/local/mgr5/sbin/backuptool --command dump --dump-dir /usr/local/mgr5/dump
BASHUnblock the control panel:
/usr/local/mgr5/sbin/mgrctl -m dnsmgr -u
BASH
- Copy the contents of /usr/local/mgr5/dump/ directory to the /opt/ispsystem/dnsmanager6/dump/ directory of the server with DNSmanager 6.
- Copy the config file /usr/local/mgr5/etc/dnsmgr.conf to the /opt/ispsystem/dnsmanager6/etc/ directory of the server with DNSmanager 6.
- 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.
- Prepare a dump generation utility:
On a server with DNSmanager 6:
- Remove, if present, from the configuration file /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf:
- parameters of PowerDNS connection — PdnsConfigDir, PdnsDBHost, PdnsDBUser, PdnsDBPassword;
- parameters of DB connection — DBType, DBHost, DBUser, DBPassword, DBName.
- The dump file 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;
- to migrate IP addresses to a new server with DNSmanager 6, do not change them in the dump files.
Block the control panel:
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -l
BASHPrepare the database:
mysql -e 'DROP DATABASE dnsmgr; CREATE DATABASE dnsmgr'
BASHRestore the dump:
/opt/ispsystem/dnsmanager6/sbin/backuptool --command restore --dump-dir /opt/ispsystem/dnsmanager6/dump
BASHDelete the DB cache:
rm -rf /opt/ispsystem/dnsmanager6/var/.db.cache.*
BASHUnblock the control panel:
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -u
BASHFor 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" : [ ... ], ... } ]
BASHAdd parameters to etc/dnsmgr.conf to use the default view first namespace from dump/dns.dump.json:
DefViewUsable yes DefViewAlias reseller.ru
CODERun the data recovery of the DNS server:
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns bind_ip=on
BASHThe recovery time depends on the number of namespaces and can take from a few seconds to an hour.
- Remove, if present, from the configuration file /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf:
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
Check the status of running namespaces:
Default namespace
systemctl status pdns
CODEUsers namespaces
systemctl status "pdns@*"
CODEIf the services are stopped, start them:
Default namespace
systemctl start pdns
CODEUsers namespaces
systemctl start "pdns@<view>"
CODEComments<view> — namespace
If the output of the command contains errors, run diagnostics with the journalctl utility:
journalctl -xe
CODETo fix the errors, check that the PowerDNS configuration files are correct and restart the namespaces:
Default namespace
systemctl start pdns
CODEUsers namespaces
systemctl start "pdns@<view>"
CODEComments<view> — namespace
Verifying DNS records
Check for errors when migrating DNS records:
zgrep "got error while restoring" var/dnsmgr.log
CODEzgrep "got error while restoring" var/logs/dnsmgr.log*
CODEEnter 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:
Determine the default server IP address:
ip addr
CODEExample 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
CODESave the first IP address from the network interface settings. In the example above, it is IP address 172.31.48.152.
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" : [ ...
CODESave the name parameter for this IP address. In the example above, it is ns.example.com.
Add the following parameter to the /opt/ispsystem/dnsmanager6/etc/dnsmgr.conf config file
DefViewUsable yes DefViewAlias <name>
CODEComments<name> — saved value of the name parameter
Restart the control panel:
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr -R
BASH- 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
BASHif you are transferring a DNSmanager 5 database dump:
/opt/ispsystem/dnsmanager6/sbin/mgrctl -m dnsmgr restore_dns bind_ip=on
BASH
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
192.168.1.1 — non-existing IP address
Solution:
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"
CODEIf the error contains the IP address 192.168.1.1, the parameter should be changed to:
"destip": "192.168.2.2"
CODERestart 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.log — installation script;
- /opt/ispsystem/dnsmanager6/var/backuptool.log — dump generation utility.