Read Windows Server 2008 R2 Unleashed Online
Authors: Noel Morimoto
Exploring DHCP Changes in Windows Server 2008 R2
337
Automating DHCP Database Backup and Restore
11
The process of backing up all DHCP settings and restoring them onto the same (or a differ-
ent) server has been streamlined in Windows Server 2008 R2. No longer do administrators
need to export Registry keys and manually move databases between servers or use the
DHCP import/export tool from Microsoft to migrate DHCP. The backup and restore process
can be accomplished directly from the MMC, and the migration of DHCP server data can
be performed using tools included with the Windows Server 2008 R2 operating system.
The DHCP Server service on Windows Server 2008 R2 will back itself up automatically
each hour to the %systemroot%\system32\dhcp\backup. Of course, only the most recent
backup is maintained in this folder; if historic backup is required, an administrator should
enable Volume Shadow Copy on the drive that contains the system root and also perform
periodic backups of the DHCP server using Windows Backup or another backup solution,
such as Microsoft Data Protection Manager. When a DHCP administrator is going to make
changes to a DHCP server, it is a best practice to manually perform a backup of the DHCP
database and configuration by performing the following steps:
1. Open the DHCP management console (Start, All Programs, Administrative Tools,
DHCP). If prompted, click Continue to confirm the action.
2. Right-click the server name and choose Backup, as illustrated in Figure 11.6.
ptg
FIGURE 11.6
Backing up a DHCP database.
3. Specify a location for the backup file, and click OK. The backup files will then be
saved into the location you chose.
338
CHAPTER 11
DHCP/WINS/Domain Controllers
To restore a previously backed up DHCP server configuration and database to the same or
an alternate server, perform the following steps:
1. Open the DHCP management console on the server to which you want to restore
the scope (Start, All Programs, Administrative Tools, DHCP). If prompted, click
Continue to confirm the action.
2. Right-click the server name and choose Restore. Select the location where the backup
files can be found, and click OK.
3. When you see a dialog box asking whether the service can be stopped and restarted,
click Yes to continue. The service will be restarted, and the entire database and
Registry will be restored.
NOTE
The DHCP backup and restore process is extremely useful in migrating existing DHCP
server configurations, scopes, and up-to-date lease information to new DHCP servers.
However, because down-level (pre–Windows Server 2008 R2) DHCP servers do not sup-
port automatic backup and restore, you will need to migrate from these servers by
either the DHCP import/export tool between Windows 2003 systems or the Windows
Server Migration Tools can be used to migrate the Windows Server 2003 DHCP server
configuration and database to a Windows Server 2008 R2 system.
ptg
Migrating DHCP Servers Using Windows Server Migration Tools
Windows Server 2008 R2 includes a new set of PowerShell cmdlets called the Windows
Server Migration Tools. These tools can be installed on a Windows Server 2008 R2 system
from the Add Features Wizard in Server Manager. The Windows Server Migration Tools can
be used to migrate services between source servers running Windows Server 2003,
Windows Server 2008, and Windows Server 2008 R2 to destination Windows Server 2008
R2 systems. DHCP is one of the services that can be migrated with these tools. One of the
major advantages of this tool is the fact that it will migrate not only scope information,
but it will also migrate the existing leases on the source server scope.
Before the Windows Server Migration Tools can be used to migrate DHCP services from
one server to another, the tools will need to be installed on both the source and destina-
tion servers. Because the Windows Server Migration Tools are included with Windows
Server 2008 R2, the tool must be packaged and installed on Windows Server 2003 or
Windows Server 2008 systems if the source servers are running either of these operating
systems. The overall process of using the Windows Server Migration Tools to migrate
DHCP services is as follows:
1. Verify that the DHCP server settings, scopes, and scope options on the source DHCP
server are the desired settings to migrate, and adjust as necessary.
2. Install the Windows Server Migration Tools on a Windows Server 2008 R2 system.
3. Create a deployment folder for the correct operating system (Windows Server 2003 or
Windows Server 2008) and platform (x86 or amd64) from a command prompt on the
Windows Server 2008 R2 system with the Window Server Migration Tools installed.
Exploring DHCP Changes in Windows Server 2008 R2
339
4. Install or verify that the Windows Server Migration Tools prerequisites are installed
on the source and destination servers, which include the latest Windows PowerShell
11
for the specific operating system and platform.
5. Install the Windows Server Migration Tools package on the desired source and desti-
nation DHCP servers.
6. Run the Windows Server Migration Tools export cmdlet, locally, on the source DHCP
server and copy the export files to the destination DHCP server.
7. Unauthorize the source DHCP server and change the IP address or remove the
system from the network permanently.
8. Add the original source DHCP server IP address to the destination server as a primary
IPv4 address on a network adapter.
9. Run the Windows Server Migration Tools import cmdlet, locally, on the destination
DHCP server.
10. Enable the DHCP Server service, start it, and verify the imported settings.
11. Authorize the DHCP server.
Installing the Windows Server Migration Tools on Windows Server 2008 R2
Before the Windows Server Migration Tools can be used to migrate DHCP services between
servers, it must be installed on a Windows Server 2008 R2 system. To install the Windows
ptg
Server Migration Tools, perform the following steps:
1. Choose Start, All Programs, Administrative Tools, Server Manager. In the console tree,
right-click on Features and then click Add Features to start the Add Features Wizard.
2. On the Select Features page, scroll down the list of features and select the check box
next to Windows Server Migration Tools; then click Next to continue.
3. On the Confirm Installation Selections page, click Install to begin installing the
Windows Server Migration Tools.
4. On the Installation Results page, review the results and click Close to complete the
installation.
Creating the Deployment Folder Package of the Windows Server Migration Tools for Down-
Level Operating System Installation
When DHCP services will be migrated to a Windows Server 2008 R2 DHCP server from a
source Windows Server 2003 or Windows Server 2008 system, the Windows Server
Migration Tools will need to be packaged for deployment and installation on those
down-level operating systems. To build the deployment folder package, perform the
following steps:
1. Using an account with administrator permissions, log on to the Windows Server
2008 R2 system that has the Windows Server Migration Tools installed.
2. Open an elevated command prompt by clicking Start, All Programs, Accessories;
locate and right-click Command Prompt and choose Run As Administrator. If
prompted for confirmation, click Continue.
3. In the Command Prompt window, change the directory to
%systemroot%\system32\ServerMigrationTools.
340
CHAPTER 11
DHCP/WINS/Domain Controllers
4. Type the command SmigDeploy.exe /package /architecture x86 /os ws03 /path
c:\downloads and press Enter. This command creates the installation package for a
Windows Server 2003 x86 system and places the files in the
c:\downloads\SMT_ws03_x86 folder. If the downloads folder is not already created,
the command creates it automatically.
5. Type the command SmigDeploy.exe /package /architecture amd64 /os ws08
/path c:\downloads and press Enter. This command creates the installation package
for a Windows Server 2008 x64 system and places the files in the
c:\downloads\SMT_ws08_amd64 folder. If the downloads folder is not already
created, the command creates it automatically.
6. Repeat the last command for any additional operating systems that will be used as
either source or destination DHCP servers.
7. Close the command prompt and, if necessary, share the c:\downloads folder so that
it can be accessed across the network.
Installing the Windows Server Migration Tools on Windows Server 2003 DHCP Server
Before the Windows Server Migration Tools can be installed on a Windows Server 2003
system, the .NET Framework 2.0 must be installed as well as the latest Windows
PowerShell. Download and install these two prerequisites and also download any security
ptg
updates for these add-ons. Once those steps are completed, perform the following steps
before the Windows Server Migration Tools can be used:
1. Using an account with administrator permissions, log on to the Windows Server
2003 x86 DHCP server.
2. Click Start and select Run.
3. Type in the location where the Server Migration Tools package for this operating
system is stored (for this example, \\server20\downloads\).
4. Locate the “SMT_ws03_x86” folder that was created previously, right-click the folder,
and choose Copy.
5. Click Start and select Run.
6. Type c:\ and click OK.
7. On the root of the C: drive, right-click on a blank space and click Paste to create the
c:\SMT_ws03_x86 folder on the Windows Server 2003 system. Close the window.
8. Click Start and select Run.
9. Type cmd and click OK to open a command prompt.
10. In the Command Prompt window, change the directory to c:\SMT_ws03_x86\.
11. Type SmigDeploy.exe and press Enter to register the Windows Server Migration Tools
cmdlets into Windows PowerShell.
12. After the command completes, the original Command Prompt window will be open,
as well as a separate PowerShell window. Type exit in each of the Command Prompt
windows to close them.
Exploring DHCP Changes in Windows Server 2008 R2
341
The Windows Server Migration Tools are now installed and registered with Windows
PowerShell on the Windows Server 2003 x86 system and can be used in a PowerShell
11
window.
Installing the Windows Server Migration Tools on Windows Server 2008 64-Bit Edition DHCP
Server
Before the Windows Server Migration Tools can be installed on a Windows Server 2008 64-
bit system, install Windows PowerShell from the Add Features link in Server Manager if it
is not already installed. Once Windows PowerShell is installed, perform the following
steps before the Windows Server Migration Tools can be used:
1. Using an account with administrator permissions, log on to the Windows Server
2008 64-bit DHCP server.
2. Click Start. In the search pane, enter the path to the location where the Server
Migration Tools package for this operating system is stored and press Enter (for this
example, \\server20\downloads\).
3. Locate the “SMT_ws08_amd64” folder that was created previously, right-click the
folder, and choose Copy.
4. Click Start. In the search pane, type c:\ and press Enter.
ptg
5. On the root of the C: drive, right-click on a blank space and click Paste to create the
c:\SMT_ws08_amd64 folder on the Windows Server 2008 system. Close the window.
6. Click Start, and in the search pane, type cmd. When the command prompt is listed,
right-click the shortcut and choose Run As Administrator. If prompted, click
Continue to open an elevated Command Prompt window.
7. In the Command Prompt window, change the directory to c:\SMT_ws08_amd64\.
8. Type SmigDeploy.exe and press Enter to register the Windows Server Migration Tools
cmdlets into Windows PowerShell.
9. After the command completes, the original Command Prompt window will be open,
as well as a separate PowerShell window. Type exit in each of the Command Prompt
windows to close them.
The Windows Server Migration Tools are now installed and registered with Windows
PowerShell on the Windows Server 2008 64-bit and can be used in a PowerShell window.
Migrating DHCP Services from Windows Server 2003 x86 to
Windows Server 2008 R2
The proceeding steps can be used to migrate DHCP services from a Windows Server 2003
x86 DHCP server to a Windows Server 2008 R2 system. Migrating the DHCP services
includes several steps, which are outlined in the following sections.
342
CHAPTER 11
DHCP/WINS/Domain Controllers
Exporting DHCP Servers Setting from a Windows Server 2003 DHCP Server
Exporting the DHCP server settings and scopes must be performed on the source DHCP
server. Before this task can be performed, the .NET framework, Windows PowerShell, and
the Server Migration Tools need to be installed. Once these tools are installed, follow these
steps to export the DHCP settings from a Windows Server 2003 x86-based system.