[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] changing dns without GUI



is there a not ridiculously complex way to make dns changes with

sorry, meant *without*, but I think everyone knew that. It is -6F here right now, plus wind, I think maybe my brain is slightly frozen.

the slow-hog method via the GUI.
1) Change all TTL's to 3600 while I migrate my sites from one box to another.
2) Modify the MX record from www.domain.com to mail.domain.com
3) Add a new A Record to each site for mail.domain.com
4) Modify the A Records for each site to point to the new server

Well I'm not sure on a 3i but on a 4r there is a records file that contain all the DNS stuff for the GUI.
/etc/named/records

You can use commandline perl on this file to make all the changes you want (make a backup first just in case).
perl -pi -e 's/searchfor/replacewith/g' filename.htm

For instance if you want to change the TTL from 86400 to 3600 you would do something like this:
perl -pi -e 's/86400/3600/g' records

Then go into the GUI under the DNS settings and hit "Save Changes"

First, Michele - thanks for the offline offer, let me see how far I get :)

Use SED to do a bulk change. The RAQ GUI is junk when it comes to DNS -
command line is about 100 x faster.

WOW - it taking forever to make only minor changes. Anything is faster than that GUI

I just cat'ed out the /etc/named/records and that file certainly does at least display all the info I want to change. Can I ftp that file down to my local PC, make changes to it, ftp it back up and then do a SAVE CHANGES in the GUI??? Or is it not that easy?

I prefer to not use editors on the RAQ itself, I am very bad with vi and the other ones available, I prefer to edit off line and ftp back up.

Thanks for the assistance!!!
Jale