1ldns-compare-zones(1) General Commands Manual ldns-compare-zones(1)
2
3
4
6 ldns-compare-zones - read and compare two zonefiles and print differ‐
7 ences
8
10 ldns-compare-zones [-c] [-U] [-u] [-i] [-d] [-z] [-s] ZONEFILE1 ZONE‐
11 FILE2
12
14 ldns-compare-zones reads two DNS zone files and prints number of dif‐
15 ferences.
16 Output is formatted to:
17 +NUM_INS -NUM_DEL ~NUM_CHG
18
19 Except with the -U or -u option. Then the output is formatted to:
20 +NUM_INS -NUM_DEL ~NUM_CHG =NUM_EQ
21
22 The major comparison is based on the owner name. If an owner name is
23 present in zonefile 1, but not in zonefile 2, the resource records with
24 this owner name are considered deleted, and counted as NUM_DEL. If an
25 owner name is present in zonefile 2, but not in zonefile 1, the re‐
26 source records with this owner name are considered inserted, and
27 counted as NUM_INS. If an owner name is present in both, but there is a
28 difference in the amount or content of the records, these are consid‐
29 ered changed, and counted as NUM_CHG.
30
32 -c Print resource records whose owner names are in both zone files,
33 but with different resource records. (a.k.a. changed)
34
35 -U From resource records whose owner names are in both zone files,
36 but with different resource records, print the unchanged records
37 too (a.k.a. changed++).
38
39 -u Print resource records whose owner names are in both zone files,
40 and which resource records are the same. (a.k.a. unchanged)
41
42 -i Print resource records whose owner names are present only in
43 ZONEFILE2 (a.k.a. inserted)
44
45 -d Print resource records whose owner names are present only in
46 ZONEFILE1 (a.k.a. deleted)
47
48 -a Print all changes (except unchanged). Specifying this option is
49 the same as specifying -c -i and -d.
50
51 -z Suppress zone sorting; this option is not recommended; it can
52 cause records to be incorrectly marked as changed, depending of
53 the nature of the changes.
54
55 -s Do not exclude the SOA record from the comparison. The SOA
56 record may then show up as changed due to a new serial number.
57 Off by default since you may be interested to know if (other
58 zone apex elements) have changed.
59
60 -e Exit with status code 2 when zones differ.
61
62 -h Show usage and exit
63
64 -v Show the version and exit
65
67 Written by Ondřej Surý <ondrej@sury.org> for CZ.NIC, z.s.p.o. (czech
68 domain registry)
69
71 Report bugs to <ondrej@sury.org>.
72
74 Copyright (C) 2005 CZ.NIC, z.s.p.o.. This is free software. There is NO
75 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
76 POSE.
77
78
79
80 17 Oct 2007 ldns-compare-zones(1)