Search Engine: Elastic

Article ID: 130194, created on Jan 20, 2017, last review on Feb 2, 2018

  • Applies to:
  • Operations Automation 7.0

General Info

This article contains instructions on how to migrate a PowerDNS service from CentOS 5 (RHEL 5) service node to a new CentOS 7 (RHEL 7) service node.

A migration process includes the full backup and restore of the PowerDNS database. You can estimate a total amount of the time required for the migration as the time of full database backup and restore, plus the time to complete “Update PowerDns server” tasks after migration. The time depends on the DNS database size, CPU utilization and intensity of DNS modifications during migration. For example:

DNS database size:

  • number of records in “domains” table: 2М
  • number of records in “records” table: 20M
  • backup size: 150M
  • backup size (unpacked): 1.5G

Migration time:

  • backup time: 2 min
  • start migration time: 1 min
  • re-register DNS node: 1 min
  • restore time: 10 min
  • finish migration time: 1 min
  • total estimated migration time: 15 min

Also, take into account the time to configure IP on DNS node and the time for “Update PowerDns server” tasks to complete after migration.


  1. Migration is possible only for Operations Automation 7.0.1
  2. The mandatory HOTFIX 130329 PowerDNS v1 is installed.
  3. The mandatory HOTFIX 130570 PAU v18 is installed.
  4. A CentOS 7 node(s) for migration with temporary IP(s) is prepared.
  5. The script is downloaded to OA MN.
  6. The sha1sum of the file is checked: d9b6348534924e2e4861533d98519c9b7047ace2. This can be done by runnung:

    # sha1sum

Procedure overview

  1. Make sure your system complies with the preconditions.
  2. Check your system by running the script with --check. Fix the errors found, if any.
  3. Run the migration.
  4. Complete the post-migration steps.

Performing the check

  1. Execute on OA MN:

    # python --host-id={host_id} --check


    {host_id} - Host ID of CentOS 5 PowerDNS node

If the check is not passed, consider the the following aspects:

PowerDNS Database Lowercase Rules

  1. PowerDNS 3.x introduced new database rules for "domains" and "records" tables: CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT)))
  2. If your old PowerDNS database contains records with uppercase symbols in the tables "domains" or "records", then the check will fail and you need to update you records in the PowerDNS database with "lowercase" data.
  3. If your old PowerDNS database contains duplicates of domains in the "domains" table, then remove domain duplicates with uppercase symbols from the "domains" table in the PowerDNS database.

MN Database IDN Data "Case Folding"

  1. If your MN database contains records with uppercase symbols in the table "dns_resource_records" in the column "idn_host" (IDN data without "case folding"), then "check" will fail and you need to update you records in the MN database with "lowercase" IDN data.

Running migration

  1. Execute on OA MN:

    # python --host-id={host_id} --backup-and-migrate-start --backup-ip={backup_ip}


    {host_id} - Host ID of CentOS 5 PowerDNS node
    {backup_ip} - IP of CentOS 7 PowerDNS new node, accessible from OA MN node
  2. Replace CentOS 5 node with new CentOS 7 node with the same IP(s): assign IP(s) and hostname from source node (CentOS 5) to the destination node (CentOS 7). Keep in mind, you will have to configure the IP addresses and interface names to the destination host as they are. That is, if the BackNet IP address of the source node is bound to the eth0 interface, then on the destination node the eth0 interface should also be configured for the BackNet IP.

    Note: Apply KB 132165 if it is impossible to use old network interface names.

  3. Re-register CentOS 7 node: PCP > Infrastructure > Service Nodes> <Node> > Summary > Reregister
  4. Complete all tasks that belong to migrated node (except failed DNS tasks).
  5. Run the script on OA MN node:

    # python --host-id={host_id} --restore-and-migrate-finish


    {host_id} - Host ID of PowerDNS node

Post-migration steps

Wait for all the “Update PowerDns server” tasks (that belong to migrated DNS server) to complete.

0871c0b47b3b86ae3b1af4c2942cd0ce caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 1941880841f714e458ae4dc3d9f3062d

Email subscription for changes to this article
Save as PDF