ServerTune provides -- managed and un-managed -- VPS hosting solutions at affordable prices to accommodate your personal and/or businesses needs.
Click here for more info ...

Browse by category
Search | Advanced search
If you wish to update all DNS zones, you can use perl command to accomplish this task. Let's say you want to update the Nameservers, SSH to the server and run the following command: (replace the words in caps/green color with your own)
cd /usr/local/directadmin/data/users
perl -pi -e 's/NS1.OLD.TLD/NS1.NEW.TLD/' */user.conf
perl -pi -e 's/NS2.OLD.TLD/NS2.NEW.TLD/' */user.conf
perl -pi -e 's/NS1.OLD.TLD/NS1.NEW.TLD/' */reseller.conf
perl -pi -e 's/NS2.OLD.TLD/NS2.NEW.TLD/' */reseller.conf
cd /var/named #(or whatever the path to your *.db files is, eg: /etc/bind, /etc/named)
perl -pi -e 's/NS1.OLD.TLD/NS1.NEW.TLD/' *.db
perl -pi -e 's/NS2.OLD.TLD/NS2.NEW.TLD/' *.db