Exporting zone data
There are four methods you can use to export DNS zone files from IBM® NS1 Connect® .
- Option A: Exporting a zone file by using the API (for exporting BIND-compatible zone file)
- Option B: Enabling outgoing zone transfers by using AXFR
- Option C: Using the NS1 Connect API to view a zone's configuration details
- Option D: Using a DNS summary script provided by IBM support
Zone files exported from NS1 Connect platform include zone-level data and short answers for records within the zone. The exported files do not contain Filter Chain configurations.
In addition to zone export, Cloud Sync (a software as a service (SaaS) application) is available as a paid add-on. A feature of Cloud Sync allows it to synchronize full information about the zone, including both metadata and Filter Chains to S3 object storage. For more information, refer to the Cloud Sync documentation.
Option A: Export a zone file by using the API
This method exports DNS zones from NS1 Connect in standard RFC– 1035 format and is asynchronous. The export is initialised using the PUT endpoint before the file can be downloaded. For large zone exports, you can check the status of the export using a specific endpoint. Refer to the API documentation for more information.
Exporting a zone file by using the API involves the following steps.
-
Initiating zone export (Start a new zone file export job).
Request
curl -XPUT https://api.nsone.net/v1/export/zonefile/$ZONE --header 'X-NSONE-Key:$API_KEY'Example response
{"generated_at":"YYYY-MM-DDTHH:MM:SS.mmmZ Standard","message":"your export is queued","status":"QUEUED"} -
Checking the status of a zone export.
Request
curl -XGET https://api.nsone.net/v1/export/zonefile/$ZONE/status --header 'X-NSONE-Key:$API_KEY'Example response
{"generated_at":"YYYY-MM-DDTHH:MM:SS.mmmZ Standard", "message":"export is ready for download","status":"COMPLETED" -
Downloading the completed zone export file.
Request
curl -XGET --location https://api.nsone.net/v1/export/zonefile/$ZONE --header 'X-NSONE-Key:$API_KEY'Example response
;; Zone: $ZONE;; Zonefile Exported: $YYYY-MM-DDTHH:MM:SS.mmmZ Standard;; This DNS zone file is provided for reference only. You must customize; this file before you deploy it on a production DNS server....
Option B: Enable outgoing zone transfers (by using AXFR)
This method exports zones using the DNS protocol. The zones can be stored or processed using any tool that supports DNS AXFR. For more information, see Configuring outgoing zone transfers (XFR).
Option C: Export a zone file by using the NS1 Connect API
This method exports all zone and record information as a single JSON object which represents a complete back up of the zone and its records.
Run the following API command to return all configuration details for the specified zone. Note that you must enter a valid NS1 Connect API key that has the view_zones permission enabled. Also, note that the response is not BIND-compatible and is not likely to be supported by third-party DNS providers. Refer to the API documentation for more information.
curl -X GET -H "X-NSONE-Key: $NSONE_API_KEY" https://api.nsone.net/v1/zones/<zoneFQDN>
Where <zoneFQDN> refers to the unique name of the zone. Likely, this is the same as the zone FQDN unless a custom zone name was applied or the zone was associated with a DNS view during zone creation.
Option D: Export a zone file by using a DNS summary script
If requested, IBM support can provide a script for you to run that produces a comma-delimited (CSV) file containing a summary listing of all NS1 Connect records in a zone and their answers.The script calls the API and formats the output into this human-readable format. To request this script, contact IBM support.