TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.27k stars 418 forks source link

[Feature request] Allow exporting (and importing?) zones in BIND format #661

Closed MaffooClock closed 11 months ago

MaffooClock commented 1 year ago

I see Issue #194 was logged for requesting the ability to import/export zones, but what was ultimately implemented was a global backup/restore (which is nice!).

However, I think it would be extremely useful to be able to download a .zone file in BIND format, a de facto standard, for any specific zone, possibly with a button right on the Zone page form.

The icing on the cake would also be the ability to upload a .zone file to create a new zone with all its records, or if the zone already exists, the file could be used to create new or update existing records.


Use Case: I had a Primary zone with dozens of hosts, then later determined that the zone should have been a Conditional Forwarder. Since there was no way to change the type, I had to delete the entire zone and start over from scratch. Before I deleted it, though, I expected there to be a quick way to export all that data, but I was surprised to learn that no such feature exists.

ShreyasZare commented 1 year ago

Thanks for the request. The import/export feature for the zone file format is not implemented since the DNS server supports only limited number of records. Which means that when you try to import a zone file and if it contains a record not implemented by the DNS server then it will fail to import the zone file.

Which is why the Import feature in the DNS Client tab was added so that you can import records off another DNS server by querying for the records or by zone transfer (AXFR). With this option, the data received is already in binary format which does not need to be parsed and can be handled easily for any type of record that is not implemented.

Changing the zone type has been requested a couple of times earlier too. Will plan some option for it which should make it easier to handle cases like you mentioned.

micush commented 1 year ago

+1 for being able to change the zone type between primary and secondary. That would make primary zone migration between servers super simple.

ShreyasZare commented 1 year ago

Will plan to add import/export zone options in future release.

echodreamz commented 1 year ago

+1 to this as well, it's a must.

ShreyasZare commented 11 months ago

Technitium DNS Server v11.5.2 is now available that adds option to import and export zone files in standard RFC 1035 or BIND formats. Do update and let me know your feedback.