4

I have a Windows 2008 R2 Server, Its primary role is to be a DNS server.

I cant find how to import the previously "exported" DNS entries.

To export I selected the server, clicked on Action->Export List.

This created a text file of the entries. How do you import these entries if something was to go wrong and I needed to restore the previous settings ?

If there is a way to do this via GUI that would be preferable to me.

dns_image

IEnumerable
  • 151
  • 1
  • 2
  • 7

4 Answers4

6

If this is a standard DNS zone, the easiest way to back it up and restore it is to simply make a copy of the related zone file; you can find it in C:\Windows\System32\DNS, it's named "your.zone.name.dns".

Massimo
  • 70,200
  • 57
  • 200
  • 323
  • Yes I found this online just recently, they also noted that they Stopped the server before copying. Is this important? – IEnumerable Sep 01 '13 at 14:45
  • 1
    It's definitely better, otherwise the file could be locked. – Massimo Sep 01 '13 at 21:26
  • @Massimo i want to change my website webserver.can i just copy file in c:\Windows\System32\dns to new server ?? – AminM Apr 20 '15 at 13:41
  • @JesonPark, what do you mean? And what exactly is a DNS server doing on a web server?!? – Massimo Apr 20 '15 at 15:37
  • @Massimo i have server with 1.1.1.1 ip .i bind my .com domain to server .now i want change my server .new server have ip 2.2.2.2 .can i copy dns config from okd server to new?? – AminM Apr 20 '15 at 16:00
  • @JesonPark please post another question if you need help, these comments are not the right place to discuss this issue. And please add more info so that we can help you. – Massimo Apr 20 '15 at 17:04
5

You can't export the zone via GUI, but you can do it via command line:

dnscmd /zoneexport MYDOMAIN.com MYDOMAIN.com.txt

By default the file MYDOMAIN.com.txt will be created in C:\Windows\System32\dns.

Source: dnscmd.

rustyx
  • 1,676
  • 3
  • 21
  • 30
2

That doesn't export the DNS records, it exports a list (txt or csv) of whatever is in the right pane. That's the same functionality as exists in any other tool, such as ADUC.

EDIT:

To clarify, you did not export the DNS records or the zone file. You simply exported a list of the DNS records, or more correctly, you exported a list of the contents of the right pane in the DNS management console. If you want to export the actual zone file then use the dnscmd tool:

http://technet.microsoft.com/en-us/library/cc772069.aspx

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
0

For anyone lucky enough to still be dealing with Windows 2003, but also dislike CMD batch scripting:

Windows Server 2003 DNS service saves files as plain text in the C:\System32\dns\ folder. These files are plain text and can be edited, changed or imported into your new linux Name Server for example.

baddy
  • 35
  • 5
5hack
  • 1
  • 1