making global changes to zone records

hi - (this may be a bit advanced for a newbie forum, if so i can repost)

here is the situation: the extraordinarily helpful people at this virtualmin forum have helped me to commence a massive website migration effort. many of the virtual-servers are just an alias to the “main” virtual-server (for lack of better words).

what i wish to do is to come up with some way that all those alias virtual-servers directly “mirror” the main virtual-server.

in other words, say i have as the main virtual-server, and then i have, iLoveVirtualminTwo,com, etc etc as alias virtual-servers of i want all the aliases (…One, …Two etc) to perfectly mirror

currently all the aliases and the main are pointing back to my soon-to-be-old server. it would be really nice to be able to throw one switch or do a couple of simple commands to do some sort of massive global change to all the aliases and the main at the same time.

i see there is a cool way to make some global changes, but it does not appear to be selective in nature. and in my case, i will only want to make a global change to about half the names.

i am thinking along the lines of putting a comment at the end of every IP number i want to change (for example “;iLoveVirtualmin”) , and then come up with some sort of find/sed command,such as

find /var/named -exec sed -e “s/;iLoveVirtualmin/;iLoveVirtualmin/” {} ;

but somehow i strongly suspect one of our local wizards can give me a better idea!

any ideas?

What change exactly are you aiming at doing for those alias servers? How are they set up now, point where, and what do they need to point to afterwards?

Generally, you can do mass-updates of DNS zones in Webmin’s “BIND DNS Server” module. Take a look at the “Existing zones” list, the checkboxes, and the “Update/add/delete records in selected” buttons below. :slight_smile:

Alternatively, if it’s just about nameserver records, you could make the change in the master domain, and then cycle (toggle off and on) the DNS feature in all your alias domains, using the “List Virtual Servers” screen, selecting the domains in question, and clicking “Update selected”.

hi Locutus -

my setup looks something like this:

i have about 50 virtual-servers, and another 50 VS’s that are an “alias”. all of them currently point to an external server.

so, i wish to have some way to globally change ONLY the alias virtual-servers, along with the ‘main’ virtual-server that the alias VS’s are associated with.

the remaining 49 VS’s wont change (not yet anyways).

it seemed as if the mass-change had no way of picking and choosing which ones to change, unless i checked them off manually (individually).

that’s why i was considering commenting each one, but that seemed pretty lame.