ldns-compare-zones(1)

πŸ’– ldns-compare-zones β€” the manual page, but make it cute πŸ’–

okay bestie, gather round, because we're talking about ldns-compare-zones(1) β€” a lil General Commands Manual moment that reads two DNS zone files, stares at them both, and tells you everything that's different. it's giving spot the difference but for DNS, and honestly? iconic. πŸ¦‹


✨ NAME ✨

ldns-compare-zones β€” read and compare two zonefiles and print differences


🌸 SYNOPSIS 🌸

ldns-compare-zones [-c] [-U] [-u] [-i] [-d] [-Z] [-z] [-s] ZONEFILE1
ZONEFILE2

πŸ’… DESCRIPTION πŸ’…

so ldns-compare-zones reads two DNS zone files and prints the number of differences. that's the whole job. she's focused. she's booked. she's not doing side quests. πŸ‘‘

the output is formatted like this:

+NUM_INS        -NUM_DEL        ~NUM_CHG

except when you use -U or -u, because then she gives you a lil extra:

+NUM_INS        -NUM_DEL        ~NUM_CHG        =NUM_EQ

now the actual comparison β€” the major comparison β€” is based on the owner name. here's the vibe check, per owner name:

  • if an owner name is in zonefile 1 but not in zonefile 2, the resource records with that owner name are considered deleted, and counted as NUM_DEL. bye bestie πŸ’€
  • if an owner name is in zonefile 2 but not in zonefile 1, the resource records with that owner name are considered inserted, and counted as NUM_INS. welcome to the group chat 🫢
  • if an owner name is in both, but the amount or the content of the records differs, those are considered changed, and counted as NUM_CHG. not quite the same person anymore, lowkey 😭

πŸŽ€ OPTIONS πŸŽ€

  • -c β€” print resource records whose owner names are in both zone files, but with different resource records. (a.k.a. changed)
  • -U β€” from the resource records whose owner names are in both zone files but with different resource records, print the unchanged records too (a.k.a. changed++). she's thorough, she's extra, we love her ✨
  • -u β€” print resource records whose owner names are in both zone files, and which resource records are the same. (a.k.a. unchanged)
  • -i β€” print resource records whose owner names are present only in ZONEFILE2 (a.k.a. inserted)
  • -d β€” print resource records whose owner names are present only in ZONEFILE1 (a.k.a. deleted)
  • -a β€” print all changes (except unchanged). specifying this option is the same as specifying -c -i and -d. the "just show me everything" button, no cap πŸ”₯
  • -Z β€” exclude ZONEMD records from comparison
  • -z β€” suppress zone sorting. > this option is not recommended; it can cause records to be incorrectly marked as changed, depending on the nature of the changes. bestie I'm begging you, don't πŸ™ˆ
  • -s β€” do not exclude the SOA record from the comparison. the SOA record may then show up as changed due to a new serial number. off by default, since you may be interested to know if (other zone apex elements) have changed. it's giving unbothered, default, unproblematic 🧚
  • -e β€” exit with status code 2 when zones differ.
  • -h β€” show usage and exit
  • -v β€” show the version and exit

πŸ‘‘ AUTHOR πŸ‘‘

written by OndΕ™ej SurΓ½ <ondrej@sury.org> for CZ.NIC, z.s.p.o. (czech domain registry). king behaviour, fr fr πŸ’œ


πŸ“ REPORTING BUGS πŸ“

report bugs to <ondrej@sury.org>.


Copyright (C) 2005 CZ.NIC, z.s.p.o.. this is free software. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like, she's free and she's yours, but she comes with zero promises, iykyk πŸ’…


and that's the whole page, bestie!! πŸŽ€ this lil cutie is dated 17 Oct 2007, and yeah she's from the ldns-compare-zones(1) manual β€” same page, same facts, just with way more sparkle now. go compare those zones. slay. periodt. ⭐

πŸ“¦ where this page comes from