<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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".</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dave</div>
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Pdns-users <pdns-users-bounces@mailman.powerdns.com> on behalf of Lucky Green <shamrock@cypherpunks.to><br>
<b>Sent:</b> Saturday, March 30, 2019 11:07 PM<br>
<b>To:</b> pdns-users@mailman.powerdns.com<br>
<b>Subject:</b> [Pdns-users] How to switch between two different "zone" files for the same domain?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hi there,<br>
<br>
How do I quickly switch between two different configurations for the<br>
same domain? In bind, I would just keep two separate zone files for the<br>
same domain, rename the one of the two zone file that I want to be<br>
active to be the active zone file for the domain, and reload bind. How<br>
is this done in PDNS?<br>
<br>
Use case:<br>
I have a primary colo site for my ESXi host and a DR site with a second<br>
ESXi host that keeps current, but powered down, copies of the guests.<br>
<br>
The guests are my individual host names in the domain. Of course the IP<br>
addresses of the guests will be different between the primary and the DR<br>
site.<br>
<br>
When I need to fail over from the primary site to the DR site, I want to<br>
quickly tell PDNS to now please serve an alternate set of IP addresses<br>
for the same host names.<br>
<br>
(I am perfectly fine with this being a manual process. I suspect that<br>
there exists a fancy way accomplishing a similar goal using LUA records<br>
that exceeds the level of complexity that I am looking for).<br>
<br>
I suspect that this is a FAQ; I am probably just not using the right<br>
search terms.<br>
<br>
Thanks!<br>
--Lucky<br>
_______________________________________________<br>
Pdns-users mailing list<br>
Pdns-users@mailman.powerdns.com<br>
<a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
</div>
</span></font></div>
</div>
</body>
</html>