Latest posts by Michael Pietroforte (see all)
- Author and member of the year 2019 – Why DevOps still doesn't rule the IT world - Wed, Jan 1 2020
- Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
- Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
DHCP is one of those essential services that can knock out a network if problems come up. That is why it is important to back up the DHCP server regularly and—even more important—to know how to restore a DHCP server.
Every Windows system backup contains a backup of the DHCP server with the database DHCP leases and the DHCP settings. However, many backup solutions only allow you to restore the complete system state but not specific system data such as those of the DHCP server. If you only have problems with the DHCP server, restoring a complete system state is usually not what you would want because it might affect other services.
You have to follow a different procedure to back up a Windows DHCP server. Windows stores the DHCP data in a database located at %SystemRoot%\System32\backup. The most important file is dhcp.mdb, which can't just be copied with backup software because it is open while the DHCP server is running. Using the Volume Shadow Copy Service to secure the data is usually not a good idea for any kind of database system.
Automatic DHCP server backup ^
However, Windows automatically creates a backup of the DHCP database in %SystemRoot%\System32\dhcp\backup every 60 minutes; this backup can be copied by your backup software. The backup time interval can be changed in the Windows Registry in HKLM\System\CurrentControlSet\Services\DHCPServer\Parameters through the BackupInterval parameter. Sixty minutes is usually sufficient, but if you use a CDP backup solution to secure your server, you might want to configure a shorter backup interval.
Manual DHCP server backup ^
You can also run backups manually through the DHCP management console. This feature can be useful if you intend to make major changes to your DHCP settings. You can back up the database to a location other than the default folder. Note that this won't change the location of the regular automatic backups. This setting can only be changed in the Windows Registry with the BackupDatabasePath parameter.
DHCP restore ^
To restore the DHCP server, you have to first restore the DHCP backup folder %SystemRoot%\System32\dhcp\backup with your backup software, and then restore the DHCP database with the DHCP management console. This will restore all DHCP leases, reserved IP addresses, and configured DHCP options. I wouldn't use the RSAT DHCP management console for this purpose. It is safer to log on to the server to do this kind of work.