How do I backup and restore Simple DNS Plus settings and data?

Data to backup

In Simple DNS Plus v. 6.0 and later, the DNS zones and records, and the different program settings (Options dialog etc.) are all stored in a single database file called "sdnsplus.db" in the Simple DNS Plus application data directory.

On Windows Vista / Server 2008 and later, this location is typically:
C:\ProgramData\JH Software\Simple DNS Plus
On earlier Windows versions:
C:\Documents and Settings\All Users\Application Data\JH Software\Simple DNS Plus

Backing up

You can shut down Simple DNS Plus, make a copy of the "sdnsplus.db" file, and that's your backup.

However, as it is likely not very convenient to shut down your DNS server at any schedule, Simple DNS Plus includes a command line option (-b) to make a copy of the database (at a safe point) while the program is still live and running.

For example:

sdnsplus.exe -b "c:\my backups\sdnsplus.db"

Restoring - all data

To later restore this on a new or reinstalled computer, simply install a fresh copy of Simple DNS Plus, and copy the backup file to the Simple DNS Plus application data directory as "sdnsplus.db".

Restoring - individual zones

In Simple DNS Plus v. 7.0 and later, you can import selected zones from a Simple DNS Plus database file / backup.

Click the "Records" button, then "File" menu, then "Import...", then "Import a set of zones listed in a DNS server boot/configuration file", then "Simple DNS Plus v. 6.0 or later "sdnsplus.db" file:

Click then "Next" button, select the zones to import, and follow the prompts.

Scheduling daily backups

You can of course also use above command line option as part of a backup script, or with Windows scheduler.

For example, to schedule a backup every night at 3:00 AM (on recent Windows versions), right-click the Windows Start button and select "Computer Management":

Right-click "Task Scheduler" and select "Create Task...":

Enter a name for the task, and select "Run whether user is logged on or not":

Select the "Triggers" tab and click the "New..." button:

Select "Daily" and enter "3:00:00 AM" and click the "OK" button:

Select the "Actions" tab and click the "New button":

In the "Program/script" field enter the path to sdnsplus.exe and in the "Add arguments" field enter "-b", space, and the path to the backup file (remember quotes if it contains spaces), and click the "OK" button:

Back in the "Create Task" window, click the "OK" button:

Enter your password, and the daily backup task has been scheduled:

Finally make sure to point your backup software to this backup folder.

28 Mar 2017 17:20 UTC
Chris Booth
I've written a simple PowerShell script which will backup the SimpleDNS database to a file named with the current date time. This allows for rolling backups via a scheduled task.

#Backup SimpleDNS DB to file
#Path to the SDNS Database - hard coded at present
$PathtoDB = "C:\ProgramData\JH Software\Simple DNS Plus"
#Path to the backup folder
$BackupPath = "F:\Simple DNS Backups\V6"
#Extension for the backup file
$BackupExtension = ".db"
#Path to the SDNS backup utility
$BackupApplication = "C:\Program Files\Simple DNS Plus\sdnsplus.exe"
#Format current date/time for the backup file name
$BackupTime = (Get-Date).ToString("yyyy-MM-dd HH-mm-ss")
#Create backup file name string
$BackupFileName = "$BackupPath\SDNS DB $BackupTime$BackupExtension"
#Build parameter for backup
$BackupArgument = "-b " + """$BackupFileName"""
#write-host $BackupApplication $BackupArgument
#Create backup folder if it doesn't exist
If ( -Not (Test-Path -Path $BackupPath))
New-Item -ItemType Directory -Path $BackupPath
#Run backup
Start-Process -FilePath $BackupApplication -ArgumentList $BackupArgument
JH Software
31 Mar 2017 21:07 UTC
JH Software
Thanks - very nice :-)
(Never published. Used for replies and to show your Gravatar icon. Never used for any other purpose.)