brendanrtg

Well-Known Member
Oct 4, 2006
311
0
166
I accidentally deleted a zone for a user and without losing data, I need to add it back.

Please advise as to what files I need to edit as ROOT under SSH to make it appear again.

Thank you.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
The file missing would be /var/named/domain.com.db. You should be able to find it in your last Cpanel backup.

If you can't find it, copy a zone file from another domain that works, say workingdomain.com, like this:

Code:
cd /var/named
cp workingdomain.com.db domain.com.db
replace workingdomain.com domain.com -- domain.com.db
then you have to edit the file /etc/named.boot and add a line sequence to the end for your domain. It will be completely obvious what's needed when you see the file. Then restart named with "rndc reload" and check /var/log/messages for error messages. If you get it right, you'll see your domain.