Changes made by hand in a DNS zone file disappear
A DNS record you add by hand to a BIND zone file works for a while, then disappears. UrbeStack writes each zone from its database, so use its commands to add records that stay.
Symptoms
BIND answers with a record you added by hand to a file under /etc/urbestack/bind/zones/ after you run rndc reload. The record disappears after the next change to the zone in UrbeStack.
The first line of the file describes what happens to manual edits.
; Managed by UrbeStack. Zone example.com, rendered from the database; edits here are lost.Cause
UrbeStack keeps every DNS record in its database and writes each zone file from that database whenever the zone changes or is rebuilt. BIND only reads the files.
The next write leaves out records you added by hand because the database has no entry for them.
Resolution
Add the record with an UrbeStack command. This example adds an
Arecord namedwww.urbestack-dns-record-add --zone example.com --name www --type A --content 203.0.113.10The command accepts
A,AAAA,CNAME,MX,TXT,SRV,CAA, andNSrecords. Give--namerelative to the zone, or use@for the zone itself.List the records UrbeStack keeps for the zone.
urbestack-dns-zone-get --name example.comQuery BIND for the new record.
dig +short A www.example.com @127.0.0.1The query returns
203.0.113.10.