Thank you for visiting the Rackspace Community
The The Community is live! Post new content or topics so our teams can assist.

Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.

Cloud DNS Zone File


Does anyone know of an easy way to export a zone file in Cloud DNS?

There doesn't appear to be any shortcut on the control panel.  I have reviewed the info for using an API call, but I am a bit confused on how to implement that way.

Any suggestions or help would be appreciated.

Thank you!

  • Hello Aaron!

    At this time you can only export DNS zones from Cloud DNS via the API. You can also contact support to have them export your DNS zones in bind9 format. Others might have some other suggestions as well...



  • Hey Aaron,

    Just to add to this, you can do this through our API by using CURL and the full details of the request you will need to send can be found here.

    I decided to give this a go and here's the process:

    - Send the initial request to export the domain, just replace the ACCOUNTID, DOMAINID and TOKEN with your relevant details:

    CURL -X GET -H "X-Auth-Token: TOKEN" -H "Content-Type: application/xml" -H "Content-Length: 0"

    - This will return an asynchronous request (which you can read about here) which will show the following details as an example:

    <?xml version='1.0' encoding='UTF-8'?>

    You'll notice that the above status shows as "RUNNING" meaning it's dealing with our request. We can now query the callbackUrl to find the details of the request.

    - Query the callbackUrl by adding ?showDetails=True:

    CURL -X GET -H "X-Auth-Token: TOKEN" -H "Content-Type: application/xml" -H "Content-Length: 0"

    - If the callbackUrl has finished "RUNNING" status and moved to "COMPLETED" then you should receive a response like this:

        "response": {
            "id": 3712186,
            "contentType": "BIND_9",
            "contents": "\t\t300\tIN\tSOA\ 1372115361 21600 3600 1814400 300\\t\t300\tIN\tNS\\\t\t300\tIN\tNS\\n",
            "accountId": 10118579
        "status": "COMPLETED",
        "verb": "GET",
        "jobId": "b87f134e-73b4-441a-94a9-9637d32579b7",
        "callbackUrl": "",
        "requestUrl": ""

    If you don't receive the BIND9 format export then you should check the status of the callbackUrl by adding the ?Status to the CURL command:

    CURL -X GET -H "X-Auth-Token: TOKEN" -H "Content-Type: application/xml" -H "Content-Length: 0"

    If the status is still RUNNING then please wait for the job to complete, if it's in an "ERROR" status then try requesting a new export by using the initial CURL command. If you're still unable to get an export please contact support for us to investigate further.

    Just one last important note from this:

    "This call is for a single domain only, and as such, does not traverse up or down the domain hierarchy for details (that is, no subdomain information is provided)."

    Please let me know if you experience any issues.



  • Just found this gist from DavidWittman:

    In order to use his script, you need to first install python-clouddns:

    sudo pip install python-clouddns

    Then edit the script and add your username, apikey, and the directory you want the bind9 files to be placed. When you run the script, it will loop through all your domains and export them to the local directory you choose.