DNS Restore: subdomain: don't alter custom records

Version 1.57

Bugfix
Finished

If you've created a subdomain on your DA box.. but manually changed the A record to something external, DA will now respect that custom value during the restore. Setup: Backup box: Domain is set to 1.2.3.4 but custom sub A record manually changed sub A 5.6.7.8 where 5.6.7.8 is some external IP, not on this box. Usually, it would make more sense to just delete the subdomain in DA to prevent this, and just add the remote record manually, but DA will handle it now anyway. Issue was that after restoring to new box on 2.3.4.5, it would end up with 2 records: sub A 5.6.7.8 sub A 2.3.4.5 DA was correctly respecting the custom IP first during the zone restore, but the domain's 2.3.4.5 IP was being added when DA "restored" the subdomain (which creates the subdomain using the domain's IP). ==== FIX - If the User is being created during a restore (an not a merge) - and a subdomain record has a custom IP A/AAAA or CNAME value - and for A/AAAA, the value of that subdomain is not part of the local list of restored IPs (5.6.7.8 is not in the 2.3.4.5 list) then add the DNS during subdomain creation, during a creation restore will not happen. The original "sub A 5.6.7.8" will remain in the zone, and "sub A 2.3.4.5" will not be added.

Interested to try DirectAdmin? Get a 30-day Free Trial!