Link to home
Start Free TrialLog in
Avatar of Lumious
LumiousFlag for United States of America

asked on

Backup/Restore DNS

Hi,

I'm looking for an easy way to be able to export/restore our DNS.  The DNS server is a Domain Controller so Active Directory is on there as well.  In case we have an incident where DNS zones/entries have been deleted, we would like an easy way to be able to restore them if needed.

Please let me know step by step on how to perform these tasks whether it be through a script or third party app.

Thanks
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Avatar of Lumious

ASKER

Hi,

I see that you have replied on my other post about DHCP.  But this post is about DNS Backups/Restores, not specifically DHCP.

Please let me know when you get a chance.

Thanks
I apologize for conflating the two posts!

As we're talking about Active Directory Integrated DNS, all the DNS information is backed up when you backup the System State of the Domain Controller.  Ideally, you should have multiple DCs, each running DNS, so the loss of a single DC doesn't impact Active Directory or your internal DNS.

You would really have to mess DNS up to justify doing a restore from backup.  But if you found yourself in that position, I would recommend doing an Authoritative Restore of Active Directory as well, since AD and DNS are so tightly integrated.
Avatar of Lumious

ASKER

Hi,

One of our issues that we ran across recently was that on our main Domain Controller which has AD, DNS, and DHCP, some entries/zones, were removed, along with DHCP zones.  Once we noticed what happened, it had replicated out to the other DC's in the environment.  So we had to actually restore a DC from a previous backup to get the entries/zones of the DNS, grab them, and then restore them on the main DC so that it would push it out to the rest of the DC's in the environment.  So we basically had a major DNS issues all throughout our environment.

So if this ever happens again, that's why I was wondering what the best and easy way would be to be able to backup the DNS entries/zones either manually/automatically, so that we would be able to restore everything in a heartbeat if we ever needed to.

Please let me know when you get a chance.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Paul MacDonald
Paul MacDonald
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lumious

ASKER

Hi,

After reviewing you post and the link provided I believe I have a full understanding of this now.

I actually tried out the command script to backup one of the DNS zones and was successful.  

Now if I wanted to run this command script on an automated schedule, what would your suggestion be?  To run this manually I ran it through PowerShell and it exported/backed up the DNS zone to the location.

Ex:

dnscmd SERVERNAME /ZoneExport domain.com backup\domain.com.dns.bkp

Also when I tried to run this script a second time, it fails out and indicates in the PowerShell screen that "Error_Already_Exists".  So maybe there could be something added to this where it puts the "date/time" on the end of the file it exports so that it could be run again and again.

Please let me know when you think?  If I have to start up another question I can.

Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lumious

ASKER

Hi,

I've been trying to get the following command to run through task scheduler but have been unsuccessful.

dnscmd SERVERNAME /ZoneExport  DOMAIN.COM backup\DOMAIN.COM.dns.bkp

The manual way I do it, is to open powershell as Admin, and copy and paste the command into the window, and it runs successfully.

I need to know how to make this run through the task scheduler.  I'm not a scripter so I don't know what commands I have to put in the .ps1 file (powershell) in order for this to execute correctly.

Please let me know when you get a chance.

Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial