DHCP, Task: Pull configuration, transaction logs, and database to external storage

Pull configuration, transaction logs, and database to external storage in DHCP Operations Guide

Task: Pull configuration, transaction logs, and database to external storage

The intent of these backups is to provide an externally stored restore source that can be readily accessed in the event of local database corruption.

By default, Windows Server 2003 creates a backup of the DHCP database and transaction logs every 60 minutes, and a “backup on shutdown” option may also be enabled on all DHCP servers. These two features create a backup copy of the Dhcp.mdb database, the transaction J*.log files, and the registry configuration in DhcpCfg.

In the event of a failure, the order of restore from backup should be the latest 60-minute backup, then the daily backup on external storage, and - worst case - the weekly full system. The backups created by each option cannot simply be restored on any host; they require a machine with an identical configuration to the backup source.

The following are three options to achieve this intent.

Procedure Option 1: Manual backup to tape or external locally-attached storage (ShadowCopy) using NTBackup

1. From a Windows Server 2003 with access to a tape device, on the Start menu, click Run, type ntbackup.exe and click OK.

2. If Backup or Restore Wizard window is shown, click Advanced Mode.

3. Click Backup Wizard (for advanced).

4. Select Back up selected files, drives, or network data and click Next.

5. Choose the DHCP backup directory, such as the default “C:%systemroot%\System32\dhcp\backup” if local, or “\\hostname\ADMIN$\System32\dhcp\backup” if remote (appropriate administrative rights are required), and click Next.

6. Select an appropriate backup destination, such as a storage area network (SAN) connected tape drive, or choose a directory by clicking Browse. Selecting a directory will enable a ShadowCopy backup of the directory into a file.

7. Type in a name for the backup and click Next.

8. Make sure the appropriate media is loaded or the target directory is accessible, and click Finish.

Procedure Option 2: Scriptable manual copy to remote server directory

Make sure a share with restricted access has been created for the DHCP server’s backup directory. To create a share with restricted access to the DHCP backup directory on the Windows Server 2003 DHCP server, follow these steps:

Using Server Management:

1. Click Start, then All Programs, then Administrative Tools, and click Server Management.

2. Connect to the specific remote Windows Server 2003 DHCP server and create a new share specifying the DHCP backup directory, such as the default “C:\Windows\System32\dhcp\backup.” Make sure the share is read-only, and customize permissions to only the group or user responsible for backup and maintenance of the DHCP server.

 

Using Command Line:

1. On the Start menu, click All Programs, then click Accessories, then click Communications, and then click Remote Desktop Connection.

2. Connect to the specific remote Windows Server 2003 DHCP server. On the remote system Start menu, click Run, and type cmd

3. Run the command on the Windows Server 2003 DHCP server:
net share dhcpbackup=%systemroot%\system32\dhcp\backup /grant:username,read /users:1 /cache:none

4. Execute the following command lines on an administrative client with access to the DHCP server and repository:
net use \\DHCP_Server_hostname\dhcpbackup
net use \\Repository_hostname\sharename
xcopy \\DHCP_Server_hostname\dhcpbackup
\\Repository_hostname\sharename /I /V /E /H /K /X /Y
net use \\DHCP_Server_hostname\dhcpbackup /delete
net use \\Repository_hostname\sharename /delete

Procedure Option 3: Create an up-to-the-minute manual backup of the DHCP database on the local system

1. On the Start menu, click Run and type:
%SystemRoot%\system32\dhcpmgmt.msc /s

2. In the console tree, click the applicable DHCP server.

3. On the Action menu, click Backup.

4. In the Browse for Folder dialog box, choose a local drive for the DHCP database backup folder.

5. Verify that the backup location is on a different volume or drive than DHCP’s automated backup set. (This defaults to C:\windows\system32\dhcp\backup.)

6. Click OK.

 

Procedure Option 4: Create an up-to-the-minute manual extract of the DHCP server’s DHCP service configuration

1. On the Start menu, click Run. Type cmd and click OK.

2. Type the netsh command:
Netsh DHCP Server \\<servername> > dhcpsvr-MMDDYYYY.dump

3. Replace MM with the month, DD with the date, and YYYY with the year.

4. Store this dump file remotely, in a similar fashion to the command line section of the previously listed procedure option 2. Additionally, this dump file can also be used to build and deploy DHCP servers.

Dependencies

None

Technology Required

Base DHCP Windows Server 2003
Netch.exe