Recipe14.15.Restoring the DHCP Database


Recipe 14.15. Restoring the DHCP Database

Problem

You want to restore the DHCP database.

Solution

Using a graphical user interface

  1. Open the DHCP snap-in on the target DHCP Server.

  2. In the left pane, click the server node.

  3. From the menu, select Action

    Select the folder that contains the backup files (the default location will automatically be opened) and click OK.

  4. If the DHCP Server service is running, you'll be prompted to restart it for the changes to take effect. Click Yes.

Using a command-line interface

You can't initiate a restore from netsh, but if you've exported the DHCP Server configuration with the dump option (see Recipe 14.14), you can import it elsewhere. The following command imports the configuration saved to the file dhcpconfig.dmp:

> netsh exec dhcpconfig.dmp

Discussion

In Recipe 14.14, I outline how the DHCP Server automatically makes a copy of the DHCP database every 60 minutes. The DHCP database contains all the scope information, reservations, leases, and options. The server also backs up a portion of the DHCP Server registry key, which contain settings related to database path and audit logs among other global settings. Most of these registry values can be set with netsh. Run netsh dhcp server set /? to get a list.

If you restore via the DHCP snap-in, both the database and registry key are restored. In order for the change to take effect, you have to restart the DHCP Server if it is already running.

One thing that is not restored, because it is not backed up, is the DNS credentials (user name, password, and domain) used for making dynamic DNS updates. If your DHCP Server is not performing dynamic DNS updates on behalf of your clients, you do not need to worry about this; but if you are, then you'll need to manually restore these settings. See Recipe 14.19 for more information on these settings.

See Also

Recipe 14.14, Recipe 14.19, MS KB 173396 (How to Restore a Corrupted DHCP Database File), MS KB 145881 (How to Use Jetpack.exe to Compact a WINS or DHCP Database), and MS KB 283251 (How to Use the Jetpack Utility on a Clustered WINS/DHCP Database)



Windows Server Cookbook
Windows Server Cookbook for Windows Server 2003 and Windows 2000
ISBN: 0596006330
EAN: 2147483647
Year: 2006
Pages: 380
Authors: Robbie Allen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net