# Backup / Restore Windows DNS

How do I backup the Windows DNS (AD) content, in a form that enables simple restore?

Partial restore, e.g. a sub-domain, is also nice to have. I am not looking for solutions involving full Windows system backup.

-

You can use dnscmd to dump the zone files to disk (although I think it excludes the glue records). Here's the batch file I run on our DC to back up our internal zones:

dnscmd /zoneprint <ZoneName> > C:\path\to\zone\file
<Lather, rinse, repeat>

xcopy /s /e /y c:\DNSBackup \\<Backup server>\path\

-
How would I restore a zone? –  gimel Jul 14 '09 at 9:40
dnscmd /zoneadd <Zone name> /primary /file <filename> /load –  RainyRat Jul 14 '09 at 9:52
@gimel: technet.microsoft.com/en-us/library/cc756116(WS.10).aspx describes the dnscmd app. I've managed to miss this app and embarrassingly it's been around for years. Now on my list of useful applets! –  John Rennie Jul 14 '09 at 9:54