Ah, okay. That’s clearer.
I’m sure you can do this; but everything that follows is something I’ve never actually done in your exact situation. So it could be wrong advice. Wait for verification from someone who’s actually done it.
What I personally would do would be give the new server a unique hostname on the same domain as the old one. So if the old one were
server1.domain.tld, I might name the new one
What I did next would depend on whether I intended to keep the old server in service or not. If so, I would create two new nameservers on the new server, for example,
NS4.domain.tld , and register them with the registrar for
domain.tld. That’s assuming that the old server was using
NS2. The important thing is that the new ones be unique.
I would also create entries in BIND on the old server pointing to the IP’s for
NS4 on the new server. The old server remains authoritative for the domain. New accounts on the new server would have their nameservers pointed to the new ones on the new server, which would become authoritative for those new domains.
Now… if my intention were to decommission the old server, I would first shorten the TTLs on the old server to something absurdly short, like 300 or 600.
I would then create the identical nameservers on the new server as those on the old ones, but not register the change just yet. Virtualmin will complain, but will make the entries.
Next I would migrate all the sites and check to make sure everything was in order. Once certain of that, I would…
- Register the IP changes for the nameservers at
- Change the entries for the nameservers and all of the migrated domains, on the old server, to point to the IP’s on the new server.
- Wait until the old server hasn’t received any traffic for a few days, and decommission it.
In this way, no changes need to be made to the nameservers for the migrated domains. The IP’s for the nameservers themselves will have been changed, so there will be no need.
The old server’s role during the transition is reduced to a traffic cop, pointing any traffic that arrives during propagation or due to client-side caching to the new server. Typically it takes a few days to a few weeks for the server to no longer receive any traffic.That’s the point of shortening the TTL’s (“time to live”). It instructs connecting clients to query DNS if more than that many seconds have elapsed since their last connection. It’s useful for reducing client-side caching problems and speeding up propagation.
Again, I’ve never done this from cPanel > Virtualmin, so it’s very possible I’m missing something. When I did it, the migration was to a server with an entirely different FQDN from the old one; and because I owned all the domains to be migrated, I just batch-changed their nameservers at my registrar.
If they were client sites, I would have re-created the new server with the same FQDN and nameservers as the losing one; and with any luck, the clients wouldn’t have even noticed the change.