Skip to end of metadata
Go to start of metadata

Symptom:

You want to back up your Men & Mice configuration data, or you have already backed up your data and need to restore it from backup.

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. These instructions are for version 5.1 (and newer) of the Men & Mice Suite; for version 5.0, the stop and start commands are different.

Backing Up

If you have any dynamic zones, either stop the DNS Server Controller and named, 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 newer):
sudo launchctl unload /System/Library/LaunchDaemons/org.isc.named.plist
sudo /Library/StartupItems/mmServerController/mmServerController stop
Next, restore data.
Mac OS X - 10.6:
sudo tar xzC /var -f ~/dns.data.tgz
Later version 10.7 - 10.8:
sudo tar xfz ~/dns.data.tg -C /private
Then start up the services again:
sudo launchctl load /System/Library/LaunchDaemons/org.isc.named.plist
sudo /Library/StartupItems/mmServerController/mmServerController start
On Mac OS X 10.3, use these commands to complete the steps above:

To stop services:
sudo killall named
sudo /Library/StartupItems/mmServerController/mmServerController stop
To restore data:
sudo tar xzC /var -f ~/dns.data.tgz
To start services:
sudo /usr/sbin/named
sudo /Library/StartupItems/mmServerController/mmServerController start

Men & Mice Central

If you have the Enterprise Edition of the Men & Mice Suite, you can back up the Men & Mice Central data tables using the command line interface. Launch the Men & Mice CLI (a shell command called mmcmd in version 5.5 and above, qdnscmd in earlier versions - if you don’t have it, you can download it from our FTP server). Execute the following commands within the command line shell:
login server administrator password
backup /some/path
exit
Otherwise, you’ll have to back up the data using the instructions below.

When backing up and restoring the data of Men & Mice Central (except for backing up via the command line interface), be sure to stop the service beforehand. Otherwise, the data tables will be corrupted.

The instructions below involve shell commands. These can be executed either directly on the server in a Terminal window (/Applications/Utilities/Terminal.app) or remotely via an ssh session. These instructions are for version 5.1 or later of the Men & Mice Suite; for version 5.0, the stop and start commands are different.

Backing Up

Stop the Men & Mice Central service, using the following command:
sudo /Library/StartupItems/mmCentral/mmCentral stop

Back up the directory /var/mmsuite/mmcentral in version 5.6 and above, /var/qdns/qdnscentral in 5.1. For example, to create an archive in your home folder on the server:

In 5.6 and above
sudo tar czC /var/mmsuite -f ~/central.tgz mmcentral
In 5.1
sudo tar czC /var/qdns -f ~/central.tgz qdnscentral
Then start the service again:
sudo /Library/StartupItems/mmCentral/mmCentral start

Restoring

Stop the service as outlined above. Then restore the data directory. If you followed the instructions above exactly, you can use this shell command:

In 5.6 and above
sudo tar xzC /var/mmsuite -f ~/central.tgz
In 5.1
sudo tar xzC /var/qdns -f ~/central.tgz
Then start up the service again, as outlined in the Backing Up section above.