Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.
This question is answered.
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.
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...
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 https://lon.dns.api.rackspacecloud.com/v1.0/ACCOUNTID/domains/DOMAINID/export -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 https://lon.dns.api.rackspacecloud.com/v1.0/ACCOUNTID/status/457er0696-1bf0-4b85-8e03-1fba2cc26129?showDetails=true -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:
"contents": "reistest.com.\t\t300\tIN\tSOA\tns.rackspace.com. reis.awesome.rackspace.co.uk. 1372115361 21600 3600 1814400 300\nreistest.com.\t\t300\tIN\tNS\tdns1.stabletransit.com.\nreistest.com.\t\t300\tIN\tNS\tdns2.stabletransit.com.\n",
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 https://lon.dns.api.rackspacecloud.com/v1.0/ACCOUNTID/status/457er0696-1bf0-4b85-8e03-1fba2cc26129?Status -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.
I have contacted Support.
Sweet, thanks for this.
I will give it a try this weekend and let you know.
Appreciate the help and feedback!
Just found this gist from DavidWittman: https://gist.github.com/DavidWittman/4727690
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.
The Rackspace Community (“Community”) is provided “AS IS” without warranty of any kind. The information on the Community sites is created by members of the Community and is intended for reference and general discussions only. Although some of the content may contain information provided by Rackspace employees, it does not represent an assessment of a particular customer environment or an assessment of any specific compliance with laws or regulations or constitute advice. We recommend that you engage additional expertise in order to further evaluate applicable requirements for your specific environment. For customer specific support issues please contact your Rackspace Support Team.READ MORE
RACKSPACE MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THE RACKSPACE OPEN CLOUD COMMUNITY SITE. RACKSPACE RESERVES THE RIGHT TO DISCONTINUE OR MAKE CHANGES TO ITS SERVICES OFFERINGS AND SPECIFICATIONS AT ANY TIME WITHOUT NOTICE. USERS MUST TAKE FULL RESPONSIBILITY FOR APPLICATION OF ANY SERVICES AND/OR PROCESSES MENTIONED IN ANY COMMUNITY DISCUSSIONS. EXCEPT AS SET FORTH IN RACKSPACE GENERAL TERMS AND CONDITIONS, CLOUD TERMS OF SERVICE AND/OR OTHER AGREEMENT YOU SIGN WITH RACKSPACE, RACKSPACE ASSUMES NO LIABILITY WHATSOEVER, AND DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO ITS SERVICES INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
ALTHOUGH PART OF THE COMMUNITY GENERATED CONTENT MAY EXPLAIN HOW RACKSPACE SERVICES MAY WORK WITH THIRD PARTY PRODUCTS, THE INFORMATION CONTAINED IN THE COMMUNITY DISCUSSIONS IS NOT DESIGNED TO WORK WITH ALL SCENARIOS. ANY USE OR CHANGES TO THIRD PARTY PRODUCTS AND/OR CONFIGURATIONS SHOULD BE MADE AT THE DISCRETION OF YOUR ADMINISTRATORS AND SUBJECT TO THE APPLICABLE TERMS AND CONDITIONS OF SUCH THIRD PARTY. EVEN THOUGH RACKSPACE EMPLOYEES MAY PARTICIPATE IN THE COMMUNITY DISCUSSIONS, RACKSPACE DOES NOT PROVIDE TECHNICAL SUPPORT FOR THIRD PARTY PRODUCTS, OTHER THAN SPECIFIED IN YOUR HOSTING SERVICES AGREEMENT YOU HAVE SIGNED WITH RACKSPACE AND RACKSPACE ACCEPTS NO RESPONSIBILITY FOR THIRD-PARTY PRODUCTS.READ LESS