Comment on page
NO_PURGEindicates that existing records should not be deleted from a domain. Records will be added and updated, but not removed.
Suppose a domain is managed by both DNSControl and a third-party system. This creates a problem because DNSControl will try to delete records inserted by the other system.
NO_PURGEon a domain, this tells DNSControl not to delete the records found in the domain.
The original reason for
NO_PURGEwas that a legacy system was adopting DNSControl. Previously the domain was managed via Microsoft DNS Server's GUI. ActiveDirectory was in use, so various records were being inserted behind the scenes. It was decided to use DNSControl to simply insert a few records. The
NO_PURGEsetting instructed DNSControl not to delete the existing records.
In this example DNSControl will insert "foo.example.com" into the zone, but otherwise leave the zone alone. Changes to "foo"'s IP address will update the record. Removing the A("foo", ...) record from DNSControl will leave the record in place.
D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE,
The main caveat of
NO_PURGEis that intentionally deleting records becomes more difficult. Suppose a
NO_PURGEzone has an record such as A("ken", "126.96.36.199"). Removing the record from dnsconfig.js will not delete "ken" from the domain. DNSControl has no way of knowing the record was deleted from the file The DNS record must be removed manually. Users of
NO_PURGEare prone to finding themselves with an accumulation of orphaned DNS records. That's easy to fix for a small zone but can be a big mess for large zones.
Prior to DNSControl v4.0.0, not all providers supported
With introduction of
diff2algorithm (enabled by default in v4.0.0),
NO_PURGEworks with all providers.