Export dns zone file option in WHM

spaceman shared this idea 3 years ago
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)

Comments (12)

photo
1

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.

photo
1

I can say for myself that introducing CDN to a website, having a export on zones would make my life easier.

CloudFlare, for example would benefit greatly with this, I understand that "partnered" CloudFlare VPS providers offer this functionality, but you would need to be a provider for that functionality.

x%2010%20hosting (not to advertise, web devs should understand it ;)) has an export for CDN's and whatever else you may want a bind file for.

Would proxies count ? I'd imagine they would fall under a CDN ? I think I am grasping at straws right now but that's one reason why I think having a export for "Normal" cpanel users (not excluding resellers).

photo
photo
1

Hi, and thanks for your response.

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).

Thanks for your consideration,

Ross.

photo
2

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.

photo
3

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

  • Create a backup in cPanel
  • Download and untar it
  • Rename dnszones/domain.com.db to domain.com.txt, domain.com.zone, domain.com.bind or whatever your new service wants (txt for CF)
  • Import to your file to the new service

photo
1

+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.)

photo
1

You can simply go to var/named then download each zone... and rename the file to .txt for use with cloudflare.

photo
1

This isn't an option for clients themselves.

photo
photo
1

+1 absolutely, were hosting out dns on aws route53, and this would be very helpful to us.

photo
1

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!

photo
1

That's a great idea! It would work quite well if you only need to do one or two zones, for sure. It probably won't be optimal if you have a lot of clients that you need to do this for, or for anyone with only cPanel access, but it does help one use-case. Thanks for offering one potential workaround!

photo
1

Could be great if we could have custom DNS templates-- specially Google G-Suite MX Records

photo