|
|||
|
Changing the NS records for multiple zones
Hello,
I have 323 DNS zones on a cPanel server whose NS records I need to change within the zones themselves. Is there a quick 'n' dirty way of applying multiple changes across DNS zones? Thanks, Martyn
__________________
Memset Dedicated Hosting Managed, dedicated and VPS systems http://www.memset.com |
|
|||
|
If you want to do a from -> to change then you can use the replace command
replace fromxxxx toxxxx -- /var/named/* Make a backup first before doing that tar cf /var/namedbackup.tar /var/named |
|
|||
|
Thanks. I had quite forgotten about /var/named/*.
__________________
Memset Dedicated Hosting Managed, dedicated and VPS systems http://www.memset.com |
|
|||
|
Just a little bit cleaner run of the same command written for fewer unintended
side effects than what PlatinumServerM had in good faith posted above .... Code:
# replace '(old string)' '(new string)' -- /var/named/*.db respectively and all instances of those strings will be updated in your DNS zone files on your server. Don't forget to update the serial number on your zone files and restart your "named" service to make the changes effective: Code:
# sed -i 's/200[0-9]\{7\}/2009063010/g' /var/named/*.db
# service named restart
# service named status
zone files to a valid serial number for the date this post was made and runs in the format of "yyyymmddee" where y= year, m = month, d = day, and e = edit number for day) .
__________________
[b][color="Blue"]Server Support[/color]: [color="Red"]Server consulting, security, and management![/color][/b] Last edited by Spiral; 07-01-2009 at 01:33 AM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need a simple way to change MX records on all dns zones | Pyro411 | cPanel and WHM Discussions | 2 | 10-28-2009 11:00 AM |
| Changing MX/A records | andrewclure | cPanel Newbies | 1 | 01-30-2009 05:23 PM |
| Automatic massive add of SPF records on all existing domain zones | COBRAws | cPanel and WHM Discussions | 6 | 09-21-2007 08:05 PM |
| Change multiple DNS zones | ruber | cPanel and WHM Discussions | 2 | 07-06-2007 10:12 AM |
| Changing 'A Records' in cPanel | ganeshn11 | cPanel and WHM Discussions | 0 | 05-05-2007 03:07 PM |