To back up and restore a DHCP server properly, you have to know a few things about how Windows stores the DHCP data.

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.

DHCP backup server - dhcp.mdb in use

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 backup and restore

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.

Read 4sysops without ads by becoming a member!

Your question was not answered? Ask in the forum!

0
Share
7 Comments
  1. Jarred Fehr 9 years ago

    Good article. But it should be pointed out that you should not use the DHCP back/restore method when migrating server versions (i.e. 2003 -> 2008 R2). The 2008 server will allow you to import and show the correct scopes, but you will recieve a dreaded red x when you try to view leases. Nor will reservations show up. According to Microsoft the database formats have changed.

    The recommended procedure is to use on the 2003 server

    netsh dhcp server export %path\filename% all

    Then move that file to the new server and run

    netsh dhcp server import %path\filename% all

    Voila! All is good to go. This procedure worked for me, but there is another that utilizes the Server Migration Tool and powershell if you have a more complex enviroment.

    0

  2. Jarred, thanks. I was planning to write an article about the migration issue, but I guess you already said everything about it. 🙂

    0

  3. Jeff 8 years ago

    Great post on the 2003 -> 2008 migration

    0

  4. DK 7 years ago

    Hey Michael.

    One of our sites in another state is moving. Lets call them DHCPServer1 and they want us to move the DHCP scopes from their server to another one, called DHCPServer2.

    I just want to know if I hit restore on the DHCPServer2 using the backup file created from DHCPServer1, will it delete all current DHCP scopes on the DHCPServer2, and add in all the ones from my backup?

    I want to add all the scopes from DHCPServer1 in with whats currently on DHCPServer2.... but if Importing/Restoring will wipe the current scopes on DHCPServer2 then I'll be in a world of pain.

    Thanks

    Daniel

    1+

  5. ver faminial 4 years ago

    Hello,

     

    Can I use the Remote Server Administrative tools to backup the DHCP server installed in Hyper-V, and save in a storage drive located in the pc where the RSAT is intalled, (network storage).

     

    Thank you.

     

    VER

    1+

  6. bogski 3 years ago

    Hello,

     

    This is a very old post I was hoping someone still can answer. Can I use the backup of DHCPServer1 to the new DHCPServer2? What is the procedure of doing this? Thanks.

     

    Bogski

    1+

    • Author

      The DHCP snap-in in Windows Server 2012 R12 still offers these backup options. Thus, I believe not much has changed here. It should be possible to restore the DHCP database on another server that runs the same server version. However, the main purpose of the backup feature is to restore a corrupted database on the same server. If you want to move the DHCP to another server, you can export and import the database. If you migrate the server you should read this.

      2+

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2020

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account