More About DHCP Backup and Restore

Applies To: Windows Server 2008 R2

Maintaining a backup of the Dynamic Host Configuration Protocol (DHCP) database protects you from data loss if the DHCP database is lost (for example, due to hard disk failure) or becomes corrupted. There are three backup methods supported by the DHCP Server service:

  • Synchronous backups that occur automatically. The default backup interval is 60 minutes. You can change the backup interval by editing the following registry entry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters\BackupInterval

Warning

Incorrectly editing the registry might severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.

  • Asynchronous (manual) backups that are performed by using the backup command on the DHCP console.

When a synchronous or asynchronous backup occurs, the entire DHCP database is saved, including the following:

  • All scopes, including superscopes and multicast scopes

  • Reservations

  • Leases

  • All options, including server options, scope options, reservation options, and class options

  • All registry keys and other configuration settings (for example, audit log settings and folder location settings) set in DHCP server properties. These settings are stored in the following registry subkey:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters

Note

The Domain Name System (DNS) dynamic update credentials (user name, domain, and password) that the DHCP server uses when registering DHCP client computers in DNS are not backed up with any backup method.

Backup locations

This topic assumes that the DHCP database and its backup directories are located on the default drive and path locations. The default DHCP database backup path is %systemroot%\System32\Dhcp\Backup. You can change the database backup folder by selecting a different local folder during a manual backup or by changing the backup folder location in DHCP server properties.

When planning your backup strategy, consider the following:

  • Synchronous backups are performed while the DHCP service is running. Similarly, when you perform asynchronous (manual) backups, you do not need to stop the DHCP service unless you are moving your database to a new server.

  • The DHCP database backup folder location must be a local path.

  • Do not store DHCP server backups on the same hard drive on which the DHCP service is installed, and make sure that the access control list (ACL) for the backup folder contains only the Administrators group and the DHCP Administrators group as members. In addition to performing manual backups, back up to other locations, such as a tape drive, and make sure that unauthorized persons do not have access to your backup copies. You can use Windows Backup for this purpose.

Membership in the Administrators group or the DHCP Administrators group on the DHCP server is the minimum required to complete this procedure.

To back up the DHCP database

  1. Open the DHCP Microsoft Management Console (MMC) snap-in.

  2. In the console tree, click the DHCP server you want to configure.

  3. On the Action menu, click Backup.

  4. In the Browse For Folder dialog box, select the folder where you want to store the backup DHCP database, and then click OK.

Additional considerations

When you store a manually created backup of the DHCP database in the same location as the synchronous backup that the DHCP server creates every 60 minutes, the manual backup is overwritten when automatic backup occurs.

Restoring the DHCP database

Restoring the DHCP server database is useful in situations where the database has either become corrupted or lost. In order to successfully restore the database, you need to back up the database on a regular basis. By default, DHCP performs synchronous backups at a 60 minute interval to the %systemroot%\System32\Dhcp\Backup folder, but you can also perform manual backups, or use backup software to copy the database to other locations.

You can restore the DHCP database from a backup copy of the database file, Dhcp.mdb, by using the Restore command on the Action menu in the DHCP snap-in. When you restore the DHCP database from a backup copy of Dhcp.mdb, the following information is configured on the server:

  • All scopes, including superscopes and multicast scopes

  • Reservations

  • Leases

  • All options, including server options, scope options, reservation options, and class options

  • All registry keys and other configuration settings (for example, audit log settings and folder location settings) set in DHCP server properties.

Note

The DNS dynamic update credentials (user name, domain, and password) that the DHCP server uses when registering DHCP client computers in DNS are not backed up with any backup method, therefore they are not restored during the restore procedure. After restoring your DHCP database, configure credentials for your server and also set the state of the server.

Membership in the Administrators group or the DHCP Administrators group on the DHCP server is the minimum required to complete this procedure.

To restore the DHCP database

  1. Open the DHCP snap-in.

  2. In the console tree, click the DHCP server you want to configure.

  3. On the Action menu, click Restore.

  4. In the Browse For Folder dialog box, select the folder that contains the backup DHCP database, and then click OK.

Note

To restore the DHCP database, the DHCP service is temporarily stopped. When it is stopped, DHCP clients cannot contact the DHCP server and obtain IP addresses.
Only DHCP databases from the same language version can be restored. For example, a DHCP database from a DHCP server running an English language version of the operating system cannot be restored to a DHCP server running a Japanese language version of the operating system.

You can also use this procedure to move a DHCP database from one server computer (the source server) to another server computer (the destination server).

Additional Resources

For a list of Help topics providing related information, see Recommended tasks for the DHCP server role.

For updated detailed IT pro information about DHCP, see the Windows ServerĀ 2008 documentation on the Microsoft TechNet Web site.