I’m about to setup a whole new server (Mac OS X 10.6 Server) and want to transfer all my current zones to it. Unfortunately I cannot find a way to export and import zones files.
All zonefiles can be found in text format (RFC 1035 master file format) in
/var/named/hosts/masters/
Alternativly, you can export the zone files with the CLI (mmcmd) using the "export" command:
mmcmd> help export
export [-aging] <zonename> <filename>
Exports a zone to an external file.
The -aging argument specifies that if this is a Windows zone that has
scavenging active, the zonefile will contain the aging values for each record.
Note: You can use a dash instead of a zone name to specify the last zone used.
import can be done with the "import" command:
mmcmd> help import
import [-DS] [-aging] <zonename> <server> [ * | <slave>+ ] <filename>
Imports a zone from an external file. -DS argument specifies that the zone
created should be an Active Directory zone. -aging argument specifies that
if this zone is created on a Microsoft Windows server and <filename> is a
zonefile that contains aging values for records, those values will be
honored when the zone is created.
You can also use * instead of slave servers to add the zone as a slave zone
to all servers besides the master server.
or you can export the zones one-by-one from the GUI Console by opening a zone and then select "File -> Export ..."
Zones in RFC 1035 master file format can be imported via the GUI using the "File -> Import Zone ..." function. This function can import many zones in one step.
----
Men & Mice Support Team
support@menandmice.com
thanks a lot. This is exactly what I was looking for. I made a mistake while trying to export all zones using the GUI. I did not know (and did not seek the manual) that zones can only be exported when opened. Now I will try the CLI.