Whilst migrating from Cluster DNS with Master + 4 slaves error Errors were found in this domain's DNS records : DNS zone for domain example.com has the type slave instead of master

SYSTEM INFORMATION
OS type and version Ubuntu 24.04
Webmin version 2.111
Virtualmin version 7.9.0 Pro
Related packages Bind

I have this setup:

Server 1:
Server 2:
Server 3:

Cluster Name Servers:

Primary name server
Secondary name server #2
Secondary name server #3
Secondary name server #4

Virtualmin 7.6 (Pro) has this feature:

Add ability to host DNS zones on remote Webmin server

So now I can do away with Server #1 to #3 and rather just use one central location.

This works perfectly for new domains.

But for migrated domains, this doesn’t work. The error I get is this:

**Warning!** Errors were found in this domain's DNS records : DNS zone for domain example.com has the type slave instead of master

I’m quite sure the error is because the old slaves (and master?) is still attached to the IP address of the original master. But is there an easy way to fix it without manual changes on all the slaves?

This is the sequence that worked I’ll provide the complete steps because I’m busy with a migration.

Server 1 (Virtualmin Pro ): Old server
Server 2 (Virtualmin Pro ): New server

Cluster Name Servers (new):

Primary name server
Secondary name server #2
Secondary name server #3
Secondary name server #4

Cluster Name Servers (old):

Primary name server was the host itself but I want to detach it.

Secondary name server #1
Secondary name server #2
Secondary name server #3
Secondary name server #4

Steps to solve:

  1. Go onto old server, and change from file based DNS to remote DNS.
  2. Run the script below to backup and restore.
  3. Go onto new server, and change anything at DNS Settings => DNS Options.

At this point, the primary will take over the serial number and become the true master.

#!/bin/bash

# Check if a domain name was provided
if [ -z "$1" ]; then
  echo "Usage: $0 <domain>"
  exit 1
fi

DOMAIN=$1

virtualmin backup-domain --dest ssh://root:@new.example.com:/root/restore --domain $DOMAIN --all-features --newformat
virtualmin disable-domain --domain $DOMAIN --why "migrated to new server"
ssh root@new.example.com "virtualmin restore-domain --source /root/restore/$DOMAIN.tar.gz --domain $DOMAIN --all-features --ip6 abcd::

The only thing I can’t get working is restore-domain's ip6. I tried all the flags. The new site is given an IPv6 record but all the zone entries are missing. To fix this, per site, I go into IP address assignment, remove IPv6, and re-add, and then the records appear.