Export dns zone file option in WHM
Open Discussion
I'm looking at a DNS zone file in WHM
Home > DNS Functions > Edit DNS Zone
I'd like to see a 'Export' option here, so that we can download a text record/copy of the zone file. I've got a client asking for this now, and it appears there's no easy way to do this currently other than to go to the command line and dig the info out of /var/named and/or /etc/named/conf
(see: http://serverfault.com/questions/130756/how-to-export-zone-file-in-whm-webhost)
Could you please elaborate on the use cases for this feature?
For what end-purpose is the customer requesting this data? If it's to use it with another cPanel & WHM server, I expect you'd want an "Import" feature as well. This becomes a bit more complex.
If they simply want a copy of it for reference/other purposes, note that a backup of their site (which I would recommend all cPanel account owners maintain at all times) would have a direct copy of their BIND zone file(s).
Primarily, I'm curious about the use case(s) for this request and what is necessitating the export of a zone to the raw BIND zone format on such a frequent basis.
Could you please elaborate on the use cases for this feature?
For what end-purpose is the customer requesting this data? If it's to use it with another cPanel & WHM server, I expect you'd want an "Import" feature as well. This becomes a bit more complex.
If they simply want a copy of it for reference/other purposes, note that a backup of their site (which I would recommend all cPanel account owners maintain at all times) would have a direct copy of their BIND zone file(s).
Primarily, I'm curious about the use case(s) for this request and what is necessitating the export of a zone to the raw BIND zone format on such a frequent basis.
In this specific case, it was a government client requesting a copy of their zone file for their own internal records. So it wasn't for the purpose of importing elsewhere, as far as I know. It was simply that they wanted a quick, easy record of the zone file today.
I understand that a copy of the zone file is included in the backup of the site.... so this request is really about the immediacy of making this specific information available right now, from WHM, in a downloadable (or cut 'n paste) text format (as opposed to a screen print), without having to go looking/digging/extracting elsewhere.
I'm hoping/assuming that this "Download as a txt file" option should be that technically difficult given that when I choose to "Edit DNS Zone" the information has already been retrieved (and presented 'nicely' for the purposes of editing).
In this specific case, it was a government client requesting a copy of their zone file for their own internal records. So it wasn't for the purpose of importing elsewhere, as far as I know. It was simply that they wanted a quick, easy record of the zone file today.
I understand that a copy of the zone file is included in the backup of the site.... so this request is really about the immediacy of making this specific information available right now, from WHM, in a downloadable (or cut 'n paste) text format (as opposed to a screen print), without having to go looking/digging/extracting elsewhere.
I'm hoping/assuming that this "Download as a txt file" option should be that technically difficult given that when I choose to "Edit DNS Zone" the information has already been retrieved (and presented 'nicely' for the purposes of editing).
I would like to see this feature in cPanel interface as well. Some clients request the zone files when they are making changes or using 3rd party service providers / move to new name servers.
I would like to see this feature in cPanel interface as well. Some clients request the zone files when they are making changes or using 3rd party service providers / move to new name servers.
A real world example is people switching their name servers to CloudFlare but keeping everything else in cPanel.
Using the cPanel tools and then exporting the zone data from there and importing it to CloudFlare would be great.
Current workaround
A real world example is people switching their name servers to CloudFlare but keeping everything else in cPanel.
Using the cPanel tools and then exporting the zone data from there and importing it to CloudFlare would be great.
Current workaround
+1 for exporting the zone file for importing to other sources. We'd use it for CloudFlare.
FYI: They do a great job of guessing standard DNS records but not the newer carddav records. Copying and pasting values one by one is not viable. And then there's potentially custom records, of course, not guessable.
While we'd be happy with manual for now, this would eventually be useful for consumption via API, so that custom software which uses CloudFlare's API to add zone records could also retrieve it from WHM without manual intervention. (Sounds like from the OP this could be scripted up but if there were a download then making it available for automation would be the natural next step.)
+1 for exporting the zone file for importing to other sources. We'd use it for CloudFlare.
FYI: They do a great job of guessing standard DNS records but not the newer carddav records. Copying and pasting values one by one is not viable. And then there's potentially custom records, of course, not guessable.
While we'd be happy with manual for now, this would eventually be useful for consumption via API, so that custom software which uses CloudFlare's API to add zone records could also retrieve it from WHM without manual intervention. (Sounds like from the OP this could be scripted up but if there were a download then making it available for automation would be the natural next step.)
You can simply go to var/named then download each zone... and rename the file to .txt for use with cloudflare.
You can simply go to var/named then download each zone... and rename the file to .txt for use with cloudflare.
+1 absolutely, were hosting out dns on aws route53, and this would be very helpful to us.
+1 absolutely, were hosting out dns on aws route53, and this would be very helpful to us.
I have an Idea, Go to WHM dashboard, net click on reset dns for the doman that you want to export DNS, when done, a page with this info:
Reset DNS Zone karrito.com
Zone Reset: mydomain.com:
New Zone:
Here you will found a boxe with all setting.
Now, copy the content, and in a text editor paste the content that you are you copied and save it as dns.txt.
Go on Cloudflare or your CDN company, upoad the cdn.txt file and
And Done!
I have an Idea, Go to WHM dashboard, net click on reset dns for the doman that you want to export DNS, when done, a page with this info:
Reset DNS Zone karrito.com
Zone Reset: mydomain.com:
New Zone:
Here you will found a boxe with all setting.
Now, copy the content, and in a text editor paste the content that you are you copied and save it as dns.txt.
Go on Cloudflare or your CDN company, upoad the cdn.txt file and
And Done!
This (lack of a) feature is a way bigger deal than it seems to get credit for. There are the obvious reasons:
copying by hand is not always practical, and creates lots of opportunities for mistakes - cPanel's inadequacy in this area is something that we have to ACTIVELY watch out for with clients, as we've learned that the clunky moving process is not something you want to do in a crunch or emergency (when it absolutely should not be).
If someone only has access to cPanel, it is not only absurd to suggest that anyone should download a multiple-gig-rar file just to get a copy of the dns file(s), it is a security concern. It is effectively forcing users to download any and all sensitive information currently on their servers to their computers in order to acquire otherwise publicly accessible data. Less savvy, lazy, or even just over-worked operators can easily forget to properly dispose of this data, either not knowing or not realizing how extraordinarily sensitive it can be.
This (lack of a) feature is a way bigger deal than it seems to get credit for. There are the obvious reasons:
copying by hand is not always practical, and creates lots of opportunities for mistakes - cPanel's inadequacy in this area is something that we have to ACTIVELY watch out for with clients, as we've learned that the clunky moving process is not something you want to do in a crunch or emergency (when it absolutely should not be).
If someone only has access to cPanel, it is not only absurd to suggest that anyone should download a multiple-gig-rar file just to get a copy of the dns file(s), it is a security concern. It is effectively forcing users to download any and all sensitive information currently on their servers to their computers in order to acquire otherwise publicly accessible data. Less savvy, lazy, or even just over-worked operators can easily forget to properly dispose of this data, either not knowing or not realizing how extraordinarily sensitive it can be.
Another example, importing an exported Godaddy ZONE file. We have a situation right now where we'll have to copy paste about 50 lines from GD to cPanel. Risk exposure is pretty high this way on missing something.
Another example, importing an exported Godaddy ZONE file. We have a situation right now where we'll have to copy paste about 50 lines from GD to cPanel. Risk exposure is pretty high this way on missing something.
I needed to export a DNS zone today and I was surprised to see that there's no native feature in cPanel/WHM to do it. This is needed asap!
I needed to export a DNS zone today and I was surprised to see that there's no native feature in cPanel/WHM to do it. This is needed asap!
It seems like a small job for cPanel to add this functionality, yet it would have huge benefits for many system admins. We routinely have to update a dozen DNS records on Cloudflare, when they offer an import option.
Can someone from cPanel review this again and provide an update?
It seems like a small job for cPanel to add this functionality, yet it would have huge benefits for many system admins. We routinely have to update a dozen DNS records on Cloudflare, when they offer an import option.
Can someone from cPanel review this again and provide an update?
I would also like to see this feature.
One workaround for Cloudflare is to add your site to Cloudflare first, before changing Nameservers, and it will pull in the current DNS records from your current server. Then change the nameservers to point to cloudflare.
Unfortunately however, this doesn't seem viable if the domain's nameservers aren't currently pointed at your cPanel server.
I would also like to see this feature.
One workaround for Cloudflare is to add your site to Cloudflare first, before changing Nameservers, and it will pull in the current DNS records from your current server. Then change the nameservers to point to cloudflare.
Unfortunately however, this doesn't seem viable if the domain's nameservers aren't currently pointed at your cPanel server.
It looks like they are implementing an option via WHM API 1 . It's one step closer.
It looks like they are implementing an option via WHM API 1 . It's one step closer.
While it's an incremental step in the direction of this request, rather than a fulfillment of the request, the WHM » DNS Functions » DNS Zone Manager does offer direct access to the /var/named/domain.db file in plain text from the Actions pulldown when viewing records for a specific domain. Clicking this option will present the plaintext of the zone file and provide a copy button to pull it out into your copy/paste-buffer.
While it's an incremental step in the direction of this request, rather than a fulfillment of the request, the WHM » DNS Functions » DNS Zone Manager does offer direct access to the /var/named/domain.db file in plain text from the Actions pulldown when viewing records for a specific domain. Clicking this option will present the plaintext of the zone file and provide a copy button to pull it out into your copy/paste-buffer.
While this is a somewhat way of handling it, adding an action to download/upload (upload would be a bit riskier) a copy in that dropdown would be nice.
While this is a somewhat way of handling it, adding an action to download/upload (upload would be a bit riskier) a copy in that dropdown would be nice.
Replies have been locked on this page!