github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/language-reference/domain-modifiers/NO_PURGE.md (about)

     1  ---
     2  name: NO_PURGE
     3  ---
     4  
     5  `NO_PURGE` indicates that existing records should not be deleted from a domain.
     6  Records will be added and updated, but not removed.
     7  
     8  Suppose a domain is managed by both DNSControl and a third-party system. This
     9  creates a problem because DNSControl will try to delete records inserted by the
    10  other system.
    11  
    12  By setting `NO_PURGE` on a domain, this tells DNSControl not to delete the
    13  records found in the domain.
    14  
    15  It is similar to [`IGNORE`](IGNORE.md) but more general.
    16  
    17  The original reason for `NO_PURGE` was that a legacy system was adopting
    18  DNSControl. Previously the domain was managed via Microsoft DNS Server's GUI.
    19  ActiveDirectory was in use, so various records were being inserted behind the
    20  scenes.  It was decided to use DNSControl to simply insert a few records.  The
    21  `NO_PURGE` setting instructed DNSControl not to delete the existing records.
    22  
    23  In this example DNSControl will insert "foo.example.com" into the zone, but
    24  otherwise leave the zone alone.  Changes to "foo"'s IP address will update the
    25  record. Removing the A("foo", ...) record from DNSControl will leave the record
    26  in place.
    27  
    28  {% code title="dnsconfig.js" %}
    29  ```javascript
    30  D("example.com", REG_MY_PROVIDER, DnsProvider(DSP_MY_PROVIDER), NO_PURGE,
    31    A("foo","1.2.3.4"),
    32  END);
    33  ```
    34  {% endcode %}
    35  
    36  The main caveat of `NO_PURGE` is that intentionally deleting records becomes
    37  more difficult. Suppose a `NO_PURGE` zone has an record such as A("ken",
    38  "1.2.3.4"). Removing the record from dnsconfig.js will not delete "ken" from
    39  the domain. DNSControl has no way of knowing the record was deleted from the
    40  file  The DNS record must be removed manually.  Users of `NO_PURGE` are prone
    41  to finding themselves with an accumulation of orphaned DNS records. That's easy
    42  to fix for a small zone but can be a big mess for large zones.
    43  
    44  ## Support
    45  
    46  Prior to DNSControl v4.0.0, not all providers supported `NO_PURGE`.
    47  
    48  With introduction of `diff2` algorithm (enabled by default in v4.0.0),
    49  `NO_PURGE` works with all providers.
    50  
    51  ## See also
    52  
    53  * [`PURGE`](PURGE.md) is the default, thus this command is a no-op
    54  * [`IGNORE`](IGNORE.md) is similar to `NO_PURGE` but is more selective