Skip to end of metadata
Go to start of metadata

Symptom:

These instructions are for example useful when the DNS server is moved to a new Mac OSX server. Backing up the DNS data is also highly recommended in case of hardware failure.

Solution

These instructions involve shell commands, which can be executed either directly on the server in a Terminal window (/Applications/Utilities/Terminal.app) or remotely via an ssh session. 


Backing Up

If you have any dynamic zones, either stop the DNS Server Controller and named (see the restoring section), or else freeze the dynamic zones using the rndc command, like this:

rndc -k /var/named/conf/user_before freeze zone.name

Next, back up the data directory, which is /var/named. This command will work:

tar czC /var -f ~/dns.data.tgz named

If necessary, either restart both the DNS Server Controller and named, or else thaw the dynamic zones with the rndc command.

Restoring

If you have backed up data as outlined above, first make sure the DNS Server Controller is installed. Then stop both the DNS Server Controller and named using these commands on Mac OS X 10.4 and above:

sudo launchctl unload /System/Library/LaunchDaemons/org.isc.named.plist
sudo /Library/StartupItems/mmServerController/mmServerController stop

Next, restore data:

sudo tar xzC /var -f ~/dns.data.tgz

Then start up the services again:

sudo launchctl load /System/Library/LaunchDaemons/org.isc.named.plist
sudo /Library/StartupItems/mmServerController/mmServerController start
  • No labels