Error while trying to load DNS zone file

nibb

Well-Known Member
Mar 22, 2008
321
5
68
I'm using PowerDNS which was converted from BIND and so its using this as a back end. cPanel gives this as officially to reload a manual DNS zone change for PDNS:

I have to restore some zones from a backup, this command fails for the restored zones (works fine for previous ones) with the following message:

Example running:
pdnsutil load-zone example.com /var/named/example.com.db

Trows:

[bindbackend] Done parsing domains, 3 rejected, 150 new, 0 removed
Creating 'example.com'
Domain 'example.com' was not created - perhaps backend (bind) does not support storing new zones.

I have checked, and the file is correct and placed on /var/named, I don't see any difference between other zone files. I can also edit this fine from cPanel servers. This only happens when I restore a zone from scratch, but previous zones work fine. This implies that something is missing when I do my restore. Do I need to add some BIND configuration for the restored zone somewhere?
 

nibb

Well-Known Member
Mar 22, 2008
321
5
68
I think I found the issue. It seems the domain also has to be created in /etc/named.conf as well.

Is there a BIND command I can run to create this safely instead of having to edit the config manually? That way I can put this into the backup restore process first.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,696
352
438
Finland
cPanel Access Level
Root Administrator
If you do cPanel backups and you have "Backup System Files" enabled you find the file in system/files/_etc_named.conf.gz