zone-sync fetches DNS zones from a primary by zone transfer and stores them as zone files, so that they can be used by anything that reads zone files, for example to load Response Policy Zones (RPZ) into a resolver. It processes all zones that it has been given and exits, so that it can be run periodically.
- If there is a zone file already, zone-sync only asks the primary for the changes since its serial (IXFR). If the zone is up to date, nothing is transferred. If the primary cannot send the changes, or there is no zone file yet, the entire zone is transferred (AXFR).
- Zones can be transferred over TLS (XFR-over-TLS), and the certificate of the primary is verified.
- Zone files are replaced atomically after a successful transfer, so that anything reading them never sees a partially written zone.
- If the primary has more than one address, all of them are tried until a transfer succeeds.
- Many zones can be processed at the same time, and a zone that fails does not stop the others.
Fetch two zones over TLS and store them in /var/lib/zone-sync:
zone-sync --primary primary.example.org --secure \
example.org example.net
zone-sync(8)
explains all options.