How to migrate a BIND DNS server to new hardware?

I'd always avoid using Webmin. If it's a regularly-configured Ubuntu BIND server, it should be sufficient to install the bind9 package on the new machines, copy the contents of /etc/bind to the new machines, then adjust the settings on each machine to talk to the new one, change the delegations (or IP addresses, if appropriate) and get on with life. For a seamless (zero-downtime) migration, do one machine at a time.


Firstly make a copy of your /etc/bind directory

sudo tar czvf bind.tgz /etc/bind
Note that if your Bind run in a jail, you have to build it again by creating jail, the hierarchy, the devices ...

If not copy your bind archive remotely to your new server.

scp bind.tgz user@target:~/

Connect to your new server

ssh user@target

Install bind9 via apt

sudo apt-get install bind9

You can also grab the latest source from the isc web site (https://www.isc.org/downloadables/11)

Untar your archive into /etc/bind directory

sudo tar xzvf bind.tgz -C /etc/bind

Do the changes that you need into your config files, may be into your zones files ...

and lastly, start bind

sudo /etc/init.d/bind9 start