In following my theme for quick, free, easy tools like I posted here: https://www.dslreports.com/forum/r30282137-Quick-free-and-easy-hard-drive-monitoring
Here's another one some poor bastard like me might find useful.
Quick, free, and easy DNS server backup tool.
Disclaimer: this will backup standalone Microsoft DNS server only. AD-integrated DNS server has a different procedure revolving around the use of dnscmd.
The batch file will create a registry export of your DNS server zones and DNS daemon settings. Then, the batch makes a copy of the flat files containing all the applicable records for each zone. It will save all of these files in a folder named today's date. For example, if you ran the batch today, all the files will be saved inside C:\DNS\07-26-2016.
Finally, all of the files are backed up to C:\DNS on your local DNS server and to a remote location of your choosing using NetBIOS file share. Simply replace 1.1.1.1 with a real remote destination of your choice. And yes, make sure to create a folder called DNS on your DNS server, and DNS server backups on your remote destination. Or feel free to modify the batch file to suit your needs.
And... the batch file:
@echo offcls for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%cfor /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%afor /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%bset TODAY=%month%-%day%-%year%rem echo %TODAY%echo.echo Created 7/26/2016echo.echo.echo.echo ===================================================================echo.echo. This batch job creates a full dump of the production DNSecho server configuration and backups it up.echo.echo Please don't disturb this job.echo.echo ===================================================================echo.echo.mkdir "c:\DNS\%TODAY%reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server" "c:\DNS\%TODAY%\dns_registry_dump_%TODAY%.txt"xcopy "c:\windows\system32\dns" "c:\DNS\%TODAY%" /Snet use z: "\\1.1.1.1\c$\DNS server backups"mkdir "z:\%TODAY%"cd z:xcopy "c:\DNS\%TODAY%" "z:\%TODAY%" /Scd c:net use z: /del
↧