Importing and exporting records
SaltImport
E kontenido aki no ta disponibel den bo idioma ainda.
A zone can be filled or updated from a zone file, and downloaded as one. Open the zone and choose Import (owners and admins) or Export (everyone who can read the zone).
Import a zone file
Section titled “Import a zone file”- On the Import tab, choose A zone file and paste the records, or upload the file.
- Choose what to do with the records already in the zone:
- Merge — only the names in the paste change (the default): a record set in the paste replaces the zone’s set of the same name and type; everything else in the zone stays.
- Make zone equal to the paste — deletes everything else: record sets the paste does not have are removed. Salt asks you to type the zone name to confirm it, because this can remove records you still need.
- Choose Review the changes.
The zone file is read as a standard DNS zone file: $ORIGIN and $TTL,
absolute and relative names, @ for the zone itself, comments starting with
;, records wrapped in parentheses, and text records in several quoted parts.
$INCLUDE and $GENERATE are not allowed. If a line cannot be read, the
message names the line and shows it.
The review
Section titled “The review”The review is not a dry run to ignore: nothing has been written yet.
- Changes to apply — how many record changes there are.
- Record sets added, replaced (same name and type, other data or a new TTL), removed (only when making the zone match the source) and already as they are.
- Records read — how many the source held.
- Managed by Salt, left out — the zone’s own SOA, its name servers at the top and its DNSSEC records. Salt keeps those itself.
- Types Salt does not carry, left out — for example location records.
- Conflicts: names that already have other data — a record set in the paste that cannot stand next to what the zone already has at the same name (a CNAME cannot live beside other records). Each row shows what would be replaced and has a tick box, off by default. Ticking it deletes the existing record set and applies the pasted one in the same batch; the diff above shows the removal. Left unticked, nothing changes for that name.
- Rejected — what will not be applied, and why: a name outside the zone, or data Salt cannot read. The rest of the import still applies.
- Adjusted — a TTL that differed within one record set (the lowest is used) or fell outside the organisation’s limits (it is brought inside).
Then the record changes themselves, a line each, with + and -.
Apply writes everything as one batch: all of it or none of it, with one entry in the zone’s History and one new version of the zone. If the zone changed while you were reviewing, the import is checked again and may report that it no longer fits; nothing is half-written.
From another DNS server, choose Another DNS server (zone transfer) instead of a file. The address must be an IP address, and the server must allow the transfer to Salt.
Undo an import
Section titled “Undo an import”Every batch keeps what it would take to put the zone back. In the zone’s History, an entry with Undo this change can be undone: Salt applies the reverse as one new batch, with its own history entry. The undo can itself be undone in the same way.
Export the zone
Section titled “Export the zone”Export on the zone’s records page downloads the zone as a zone file, or
use GET /api/v1/zones/<zone>/export with a token. The file has one line per
record that is served, with the full name and the record set’s TTL, and a
header comment with the time and the counts.
Disabled records are not served, so they are not in the file (the header says how many were left out). The zone’s SOA and DNSSEC signatures are made by the name server and are not in the file. The file can be imported back unchanged.