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.
SolutionThese 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 UpIf 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.nameNext, back up the data directory, which is /var/named. This command will work:
tar czC /var -f ~/dns.data.tgz namedIf necessary, either restart both the DNS Server Controller and named, or else thaw the dynamic zones with the rndc command.
RestoringIf 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 stopNext, restore data.
Mac OS X - 10.6:
sudo tar xzC /var -f ~/dns.data.tgzLater version 10.7 - 10.8:
sudo tar xfz ~/dns.data.tg -C /privateThen start up the services again:
sudo launchctl load /System/Library/LaunchDaemons/org.isc.named.plist sudo /Library/StartupItems/mmServerController/mmServerController startOn Mac OS X 10.3, use these commands to complete the steps above:
To stop services:
sudo killall named sudo /Library/StartupItems/mmServerController/mmServerController stopTo restore data:
sudo tar xzC /var -f ~/dns.data.tgzTo start services:
sudo /usr/sbin/named sudo /Library/StartupItems/mmServerController/mmServerController start
Men & Mice CentralIf 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 exitOtherwise, 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 UpStop 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 mmcentralIn 5.1
sudo tar czC /var/qdns -f ~/central.tgz qdnscentralThen start the service again:
sudo /Library/StartupItems/mmCentral/mmCentral start
RestoringStop 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.tgzIn 5.1
sudo tar xzC /var/qdns -f ~/central.tgzThen start up the service again, as outlined in the Backing Up section above.