Migrating ~200 domains from 4 servers, DNS advice for master / slave replication

I’m migrating around 200 Virtualmin domains from four servers to one server. Unfortunately the existing domains do not have integrated DNS so their DNS is seperate.

Topology:

Three foreign name servers not controlled by us, all DNS up to date and current:
not_our_name_server_1, not_our_name_server_2, not_our_name_server_3

The four old distributed servers:
old_server_1, old_server_2, old_server_3, old_server_4

One new server:
new_server

The admin who controls the foreign name server has made new_server a slave for their name servers so all zones have copied across. Check.
In other words, on our new server, we are a slave for all four old server’s domains.

Once I restore the domain I use the undocumented switch --dns --associate which is a lifesaver because it associates my restores with the existing name server records.

I then do a cleanup, fix IPs, and also change name servers, e.g. I change it from ns1.old to ns1.new

Now the problem is what next.

I tried changing Slave to Master using Webmin, and this works, but no replication happens to the slaves, as the zone was never created on this new master.

I’m looking for some advice specifically:

  1. Bulk changing of slaves to master in Webmin
  2. Re-creation of slaves zones on new name servers.
  3. Permissions required? I tried a few domains but keep on running into issues in spite of allow zone transfers being on.
  4. Is rndc command line a good tool to use? I tried accepting the defaults in Webmin but running commands such as

rdnc addzone example.com '{ type slave; masters { a.b.c.d; d.e.f.g; }; };'

Keep on failing with

named[87107]: invalid command from 127.0.0.1#48323: failure

Any other tips please :slight_smile:

:+1:

This is perhaps a misstep. The admin who controls the foreign name server could have made the DNS records of the domains point to new_server and by doing so, your migration of web + ftp + email services would have been complete.

Then at leisure, as the concluding step of your migration, you could point the DNS of each domain to the internal DNS of Virtualmin. Once this is done, you would have DNS + web + ftp + email on Virtualmin and need neither the foreign name server nor old_server_1, old_server_2, old_server_3, old_server_4.

–dns --associate is useful, but you would not need this at all if you create a virtual server the way it is done normally in Virtualmin.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.