Rather than dropping all records in the copied zone, just compute a difference and apply it to both views.
Or perhaps you should examine why you are using views in the first place and decide if there is a better way to achieve this. Regards, Chris Buxton BlueCat Networks On Feb 13, 2011, at 7:12 PM, Terry. wrote: > Hello gurus, > > Thanks firstly since I have got many helps from the list before. > Now I'm designing a open DNS service, say I have three views as below: > > view "uni" { > match-clients { > key "unikey"; > UNI; > }; > allow-update {key "unikey";}; > zone "test.nsbeta.info" { > type master; > file "test.nsbeta.info.uni.db"; > }; > }; > > view "edu" { > match-clients { > key "edukey"; > EDU; > }; > allow-update {key "edukey";}; > zone "test.nsbeta.info" { > type master; > file "test.nsbeta.info.edu.db"; > }; > }; > > view "any" { > match-clients { > key "defaultkey"; > any; > }; > allow-update {key "defaultkey";}; > zone "test.nsbeta.info" { > type master; > file "test.nsbeta.info.any.db"; > }; > }; > > > Some customer's domain names have all three views, so I define the > zones in each view, they work fine. > > But some customers have only two views, say it's view uni and view any. > Thus I setup zones in view uni and view any, but view edu will be lost. > If the clients from edu network query for the zones, they will get > NXDOMAIN result. > > For my DNS service, the customers submit their records from web > interface, the records are inserted into database. > Then a daemon will load the new updated records from database and call > nsupdate to update them to BIND. > > I know I can use complicated SQL to resolve it, for example, if the > customer doesn't have edu view, I could copy all the records from any > view to edu view in database with SQL statement. If the customer later > add a record to edu view, before insert it to database, I have to drop > all the before records copied from any view, etc. > > But rather than using SQL doing it, is there a good BIND way handling this > case? > > Thanks in advance. > > Regards. > > > -- > Free SmartDNS Hosting: > http://DNSbed.com/ > _______________________________________________ > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users _______________________________________________ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users