In this article, I will explain how to backup DNS Windows Server 2022. Domain Name System/Server or DNS is the heart of each thing we do, on the internet and on the LAN. It is the directory book that changes names to IP addresses so we don’t have to remember the figures that represent websites, hostnames, and other resources. DNS is commonly considered an important infrastructure component.
When a disaster happened with a DNS Server, we need to restore the DNS zone to its earlier state as soon as possible. In this article, we have two options for achieving this operation. The initial option in AD DS is authoritative restore. A reliable restore of an Active Directory would take complex time-consuming and also demands the use of backups and restart of DCs. The 2nd one is to use the DNSCMD.exe using the PowerShell command to backup the zones to a text file, which is Obtainable for Windows Servers. The DNSCMD restore takes some minutes to restore a zone. We can apply to both (forward, reverse) lookup zones, either text-based or Active Directory-integrated.
Backup DNS Windows Server 2022
Article Scenario
Backup DNS zones via DNSCMD PowerShell command.
2nd, we will delete xpertstec.local DNS zones from a server for creating the disaster.
Last, we restore xpertstec.local zone from a file the one we created with the DNSCMD command.
How to take a DNS backup (xpertstec.
Log in to the Domain Controller, run Windows PowerShell and then type the following commands to backup DNS zones.
dnscmd WS2022-DC /ZoneExport xpertstec.local backup\xpertstec.local.dns.bkp
dnscmd WS2022-DC /ZoneExport _msdcs.xpertstec.local backup_msdcs.xpertstec.local.dns.bkp
Where WS2022-DC is the DNS server name.
The DNS backup copy (a text file) will be saved to the backup directory.
C:\Windows\System32\dns\backup
Launch Windows Explorer and then go to the C:\Windows\System32\dns\backup directory to verify its contents.
How to Delete DNS zones from DNS manager
Launch DNS Manager, expand the DNS server (WS2022-DC) node and then expand Forward Lookup Zones.
Right-click on xpertstec.local zone and then select delete.
Click Yes
And Yes again delete the zone from (Active Directory and DNS Server).
How to Restore the domain DNS zone
Open DNS Manager, and expand the DNS Server.
Right click on Forward Lookup Zone and then click on New Zone.
Welcome to the New Zone Wizard, click Next.
Zone Type window, choose Primary zone and then deselect the Store the zone in Active Directory, click next.
Zone Name window, enter the name of the zone being restored, xpertstec.local and then click next.
Choose the option Use this existing file radio button and then click Next.
Please make sure the current backup of the xpertstec.
Copy the xpertstec.local.dns.bkp file to the backup directory.
Paste it into the following directory
C:\Windows\System32\dns
Right-click on xpertstec.local.dns.bkp and then select rename.
Remove the .bkp extension, press enter, and click yes.
Go back to the Zone File Wizard, and then click Next.
Dynamic Update wizard window, choose to Allow both nonsecure and secure dynamic updates, and then click next.
Click finish
Forward lookup zone (xpertstec.local) has been created successfully.
Right Click on xpertstec.local zone and then select Properties.
Click on the Change… button next to the Primary field.
Change the Zone Type window, make sure the Primary zone is selected
Select the option Store the zone in Active Directory and then click ok.
Click Yes to accept the change.
On the xpertstec.local zone Properties window, choose Secure only at Dynamic updates field and click ok.
Finally, we have our DNS Zone up and running.
Summary:
By using the above steps, you can backup, and restore, the copies of the DNS zones in a way that allows high availability for your DNS
For more details please visit Microsoft
Read more: How to Backup, Restore, and Reset Windows Server.
Leave a Reply
You must be logged in to post a comment.