mahdy_sharifi

Well-Known Member
Feb 26, 2012
220
1
68
cPanel Access Level
Root Administrator
Hello :

I want Reset much DNS zone on my Cpanel server , In WHM I can only select 1 Zone for Reset , If need reset over 100 zone need too much time ! Can you guide to reset multiple zone from command line or etc ?

Thanks
 

quietFinn

Well-Known Member
Feb 4, 2006
2,040
551
493
Finland
cPanel Access Level
Root Administrator
Last edited:

mahdy_sharifi

Well-Known Member
Feb 26, 2012
220
1
68
cPanel Access Level
Root Administrator
This for All Zone , I have over 1000 zone on server and want reset only 100 of them.
they start with pattern . example : abcd*.com

Thanks
 

quietFinn

Well-Known Member
Feb 4, 2006
2,040
551
493
Finland
cPanel Access Level
Root Administrator
As cPanelTristan says in his post:
Please note that you could load the list from a precompiled list of domains instead also, then use `cat /root/domainlist` instead of reading from /etc/trueuserdomains. This way you can control what domains are being touched.
so you can do like this,
1st, you make backups:
Code:
cp -R /var/named /var/named.bak130410
cp -R /etc/named.conf /etc/named.conf.bak130410
then make a list of the domains you want to reset:
Code:
cp /etc/trueuserdomains domains_to_reset
then you edit that file:
Code:
nano domains_to_reset
remove the domains you do NOT want to reset, then save.
and then you do:
Code:
for i in `domains_to_reset | cut -d: -f1` ;do /scripts/killdns $i ;done
for i in `domains_to_reset | cut -d: -f1` ;do /scripts/add_dns --domain=$i ;done
 

mahdy_sharifi

Well-Known Member
Feb 26, 2012
220
1
68
cPanel Access Level
Root Administrator
which command can use (in CLI) for reset DNS zone ? (If I want reset DNS zone from Cli)
 

Jeff P.

Well-Known Member
Feb 2, 2016
74
16
58
Daytona Beach, Florida, USA
cPanel Access Level
DataCenter Provider
Upon doing this, it throws this error and does nothing else.

Sorry, the domain xxxxxx.com is owned by another user (xxxxx)
No valid IP specified. Using xxx.xxx.xxx.xxx
Cpanel still has not done crap about this. How about stop trying to make crap LOOK PRETTY and make crap WORK. Hundreds have asked for a bulk tool and in all these years you still do not have one. Get to work cpanel, vacation is over.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463