-
|
I want to import a zone file. Error message: Duplicate or conflicting column header for "3600" I assume it is not intended this way? Is there any easy workaround? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The import mechanisms provided by NetBox (which is everything that's on offer with the "Import" links in NetBox) do not support importing special file formats at all, particularly not zone files. In order to import data from master zone files you need to have a library that is able to parse them, which can for instance be done using If you are comfortable with Python you can very easily adapt try:
axfr_zone = from_xfr(
xfr=xfr(
nameserver,
zone_name,
relativize=relativize,
**tsig_params,
),
relativize=relativize,
)
except Exception:
self.log_failure("Zone transfer failed")
returnwith a similar piece of code using `dns.zone.from_file()´. Within the philosophy of NetBox as a "source of truth", importing data from external entities should not be something that is done after the initial migration to NetBox. It is, however, disputable whether a pure unidirectional flow of information can (and should) be maintained in all cases - I don't think so. |
Beta Was this translation helpful? Give feedback.
The import mechanisms provided by NetBox (which is everything that's on offer with the "Import" links in NetBox) do not support importing special file formats at all, particularly not zone files.
In order to import data from master zone files you need to have a library that is able to parse them, which can for instance be done using
dnspython. In theexamplesdirectory there is a sample importer that can be used to import directly from a DNS server via AXFR, but (currently) not a zone file importer.If you are comfortable with Python you can very easily adapt
AXFR_Importer.pyto read from zone files instead. Basically you need to replace