Back up and restore a Windows DHCP server: automatic backups every 60 minutes to System32\Dhcp\Backup, Backup-DhcpServer, Restore-DhcpServer, netsh backup and restore, and what a backup leaves out (DNS update credentials).
Home › Guides › DHCP backup and restore
Last updated 23 November 2026
A Windows DHCP server already backs itself up: by default it writes a synchronous backup every 60 minutes to %systemroot%\System32\Dhcp\Backup, while the service keeps running. For a manual backup use the DHCP console (Action > Backup), netsh dhcp server backup or PowerShell: Backup-DhcpServer -ComputerName "dhcpserver.contoso.com" -Path "C:\Windows\system32\dhcp\backup". Restore with Action > Restore, netsh dhcp server restore or Restore-DhcpServer -ComputerName "dhcpserver.contoso.com" -Path "C:\Windows\system32\dhcp\backup". A backup holds all scopes (including superscopes and multicast scopes), reservations, leases, all options and the DHCP server registry settings, but not the DNS dynamic update credentials: enter those again after a restore. The service is stopped during a restore, so clients can't get addresses for that time, and only a database from the same language version of Windows can be restored. Keep manual backups out of the automatic backup folder (the next automatic backup overwrites them) and copy them off the server.
| Task | DHCP console or netsh dhcp server | PowerShell |
|---|---|---|
| Back up now | Action > Backup, or backup [Path] (default %systemroot%\System32\Dhcp\Backup) | Backup-DhcpServer -Path <folder> (-Path is required) |
| Restore | Action > Restore, or restore [Path] (the service stops while it runs) | Restore-DhcpServer -Path <folder>, -Force skips the confirmation |
| Automatic backup interval | 60 minutes by default; set databasebackupinterval <minutes> or the BackupInterval registry value | Set-DhcpServerDatabase -BackupInterval <minutes> |
| Automatic backup folder | DHCP server properties, or set databasebackuppath <local folder> | Set-DhcpServerDatabase -BackupPath <folder> |
| Show the database settings | show dbproperties | Get-DhcpServerDatabase |
| Restore flag | set databaserestoreflag 1 (sets the database restore flag) | Set-DhcpServerDatabase -RestoreFromBackup $true (database has to be restored from backup) |
Microsoft's pages describe the restore flag only in those words; neither says when the restore actually happens, so check before you rely on it.
Microsoft's article More About DHCP Backup and Restore (written for Windows Server 2008 R2; it hasn't been updated since 2009, and the newer cmdlet pages don't repeat these details) says a synchronous or manual backup saves the entire DHCP database:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\ParametersNot included, by any backup method: the DNS dynamic update credentials (user name, domain and password) that the DHCP server uses to register clients in DNS. The article opens with "three backup methods" but lists only two (automatic synchronous backups and manual backups from the console); it doesn't name the third.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters\BackupInterval; netsh has set databasebackupinterval 1440 (Microsoft's example, 24 hours) and PowerShell has Set-DhcpServerDatabase -BackupInterval (minutes).%systemroot%\System32\Dhcp\Backup. You can change it in the DHCP server properties, with set databasebackuppath c:\windows\dhcp\backup (Microsoft's example) or with Set-DhcpServerDatabase -BackupPath. The folder must be a local path on the DHCP server.Microsoft's Set-DhcpServerDatabase example changes everything at once:
Set-DhcpServerDatabase -ComputerName "dhcpserver.contoso.com" -FileName "D:\NewDhcpPath\dhcp.mdb" -BackupPath "D:\NewDhcpPath\backup" -BackupInterval 30 -CleanupInterval 120
That sets backups every 30 minutes and database cleanup every 120 minutes. Note that the cmdlet reference describes -FileName as "the name of the database backup file", while the example uses it for the database file itself; read the current values with Get-DhcpServerDatabase -ComputerName "dhcpserver.contoso.com" (or netsh dhcp server show dbproperties, which lists DatabaseName, DatabasePath, DatabaseBackupPath, DatabaseBackupInterval, DatabaseLoggingFlag, DatabaseRestoreFlag and DatabaseCleanupInterval) before you change it. Microsoft's netsh page also says the DHCP Server service must be restarted before a new set databasename takes effect.
The 2008 R2 article says membership in the Administrators or DHCP Administrators group on the DHCP server is the minimum, and you don't need to stop the DHCP service for a manual backup unless you're moving the database to a new server.
netsh dhcp server prompt (or prefixed with netsh dhcp server at a command prompt): backup "c:\MyBackUpFiles\DHCP". Without a path it uses %systemroot%\System32\Dhcp\Backup, and an invalid or missing destination returns an error.Backup-DhcpServer -ComputerName "dhcpserver.contoso.com" -Path "C:\Windows\system32\dhcp\backup". -Path is the directory for the backup; -ComputerName (or -CimSession) targets a remote server; -WhatIf and -AsJob work as usual.Microsoft's Backup-DhcpServer example writes to C:\Windows\system32\dhcp\backup, which is the default automatic backup folder, so per the article above the next automatic backup overwrites it. Pick another local folder, then copy it elsewhere: Microsoft says not to keep DHCP backups on the same hard drive as the DHCP service, to limit the backup folder's ACL to the Administrators and DHCP Administrators groups, and to back up to other locations as well (it mentions Windows Backup).
restore "c:\MyBackUpFiles\DHCP" (default %systemroot%\System32\Dhcp\Backup). It returns an error if the database can't be found or was created with a different language version of the server.Restore-DhcpServer -ComputerName "dhcpserver.contoso.com" -Path "C:\Windows\system32\dhcp\backup"; add -Force to skip the confirmation prompt.Get-DhcpServerv4Scope and the DHCP console (my addition, not in Microsoft's restore steps).The console and netsh pages say the DHCP service is temporarily stopped during the restore and clients can't obtain addresses meanwhile; the Restore-DhcpServer reference doesn't mention this either way, so plan a short outage. Only databases from the same language version restore (Microsoft's example: an English-language server's database can't be restored on a Japanese-language server).
The 2008 R2 article says the same restore procedure can move a DHCP database from one server to another. To move only some scopes, include or skip leases, or keep scopes that already exist on the target, Microsoft's Export-DhcpServer / Import-DhcpServer cmdlets are more selective (and Import-DhcpServer -BackupPath backs up the target first); see export and import DHCP scopes. Microsoft's netsh reference also has netsh dhcp server 192.168.0.1 dump > C:\Dhcp\Dhcpcfg.dmp, a text dump of the configuration that netsh exec dhcpcfg.dmp replays on another server; Microsoft says to delete the default option definitions and user and vendor classes there first, then reconcile all scopes and restart the DHCP Server service (net stop dhcpserver, net start dhcpserver) afterwards.
Look up DHCP Server events such as 1046 and 1056 in the Windows Event ID Lookup, copy the Backup-DhcpServer and Restore-DhcpServer lines from the PowerShell Cheat Sheet, pull scope IDs out of netsh show output with the Regex Tester, check scope subnets after a restore with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the vendor of restored leases with the MAC Vendor Lookup. Related guides: export and import DHCP scopes, DHCP DNS dynamic updates not working (event 1056), DHCP failover events 20291 and 20292 and common Windows DNS Server and DHCP Server errors.
Restoring one server of a failover pair? See DHCP failover partner down and recover states.
Every Windows DNS Server and DHCP Server event and symptom in one place: common Windows DNS Server and DHCP Server errors.
Yes. By default the DHCP Server service writes a synchronous backup every 60 minutes to %systemroot%\System32\Dhcp\Backup while it keeps running. Change the interval with Set-DhcpServerDatabase -BackupInterval or netsh set databasebackupinterval.
Run Backup-DhcpServer -ComputerName dhcpserver.contoso.com -Path followed by a local folder. Use a folder other than the automatic backup folder, because the next automatic backup overwrites manual backups stored there, and copy the backup off the server.
Use Action then Restore in the DHCP console, netsh dhcp server restore with the backup folder, or Restore-DhcpServer -Path with the backup folder. The DHCP service is stopped during the restore, so clients cannot get addresses for that time.
The DNS dynamic update credentials (user name, domain and password) are not backed up with any backup method, so enter them again after a restore. Scopes, superscopes, multicast scopes, reservations, leases, options and the DHCP registry settings are included.
Microsoft says the restore procedure can also move a DHCP database to another server, but only databases from the same language version of Windows can be restored. To move selected scopes, Export-DhcpServer and Import-DhcpServer are more flexible.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.