[Pdns-users] How to switch between two different "zone" files for the same domain?

David Jones djones at ena.com
Sun Mar 31 07:31:17 UTC 2019

The backend is going to determine what can be done and I am not seeing that below.  There are many option depending on how complex the changes are in that zone in the DR site.  If you have a similar IP subnet scheme in a /23 or /24 with the same 4th octet and the backend is a database, then a script could easily zap the A records in that zone.  If the number of hosts at the DR site is relatively small, then a script could create/update /etc/hosts entries on the PDNS server and then serve that via "etc-hosts-file=/etc/hosts".

Bottom line, PDNS is very flexible but as an admin, one has to have a basic understandinig of how the parts fit together to take advantage of that flexibility then know something about scripting the parts together to fit a particular need.

There's probably dozens of ways to solve this and 10 replies on this thread could give you 9 different suggestions.  We need a little more detail though.

From: Pdns-users <pdns-users-bounces at mailman.powerdns.com> on behalf of Lucky Green <shamrock at cypherpunks.to>
Sent: Saturday, March 30, 2019 11:07 PM
To: pdns-users at mailman.powerdns.com
Subject: [Pdns-users] How to switch between two different "zone" files for the same domain?

Hi there,

How do I quickly switch between two different configurations for the
same domain? In bind, I would just keep two separate zone files for the
same domain, rename the one of the two zone file that I want to be
active to be the active zone file for the domain, and reload bind. How
is this done in PDNS?

Use case:
I have a primary colo site for my ESXi host and a DR site with a second
ESXi host that keeps current, but powered down, copies of the guests.

The guests are my individual host names in the domain. Of course the IP
addresses of the guests will be different between the primary and the DR

When I need to fail over from the primary site to the DR site, I want to
quickly tell PDNS to now please serve an alternate set of IP addresses
for the same host names.

(I am perfectly fine with this being a manual process. I suspect that
there exists a fancy way accomplishing a similar goal using LUA records
that exceeds the level of complexity that I am looking for).

I suspect that this is a FAQ; I am probably just not using the right
search terms.

Pdns-users mailing list
Pdns-users at mailman.powerdns.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190331/3baffec9/attachment.html>

More information about the Pdns-users mailing list