Restoring subdomain.example.org deletes the NS record in example.org when restoring from a full backup. The subdomain is being created by the Virtualmin restore process (named.service crashes when Virtualmin restarts it).
Running a check on the BIND configuration reveals:
The following errors were found in the BIND configuration file /etc/named.conf or referenced zone files ..
zone example.org/IN: has no NS records
zone example.org/IN: not loaded due to errors.
_default/example.org/IN: bad zone
<- Return to zone list
The NS records was present and the parent domain was working fine, prior to restoring the subdomain. This has happened every time I have restored a subdomain.
The fix is to go into the parent virtual server, add back the NS record, and start the named.service.
Backup from CentOS 6.9, Virtualmin full backup with all options selected, restoring to CentOS 7.4
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Wed, 02/14/2018 - 22:42 Comment #1
That sure sounds like a bug!
What was the name of the NS record that got deleted - was it for example.org , or subdomain.example.org ?
Submitted by imcdona on Thu, 02/15/2018 - 11:46 Comment #2
I'm having the same issue. It appears to only effect servers that have sub-domains.
It's also worth nothing that the template on the parent domain has
Add sub-domain DNS records to parent domain? Yes
. The template for the sub-domain is set toAdd sub-domain DNS records to parent domain? From default settings
In my case all NS records were missing from the domain. For example, if the domain is domain.tld and the subdomain is subdomain.domain.tld, a zone file is created for domain.tld and it doesn't contain any NS records.
Submitted by JamieCameron on Sat, 02/17/2018 - 11:02 Comment #3
Looking at the code, I can't see how NS records that are for the parent domain would be removed. An NS record for the sub-domain (if it exists) will be deleted though.
The parent NS record gets deleted when restoring a subdomain. example.org is just gone, after restoring subdomain.example.org.
Submitted by JamieCameron on Mon, 02/19/2018 - 19:58 Comment #5
Ok, I see the bug that causes this - it will be fixed in the next Virtualmin release.
Submitted by IssueBot on Thu, 10/11/2018 - 20:07 Comment #6
Automatically closed - issue fixed for 2 weeks with no activity.