Professional Documents
Culture Documents
The NTBACKUP you've known and loved since Windows NT® 3.5 is gone. Replacing
it is Windows Server Backup. And this new tool is not just a gussied-up NTBACKUP;
it's a whole new backup technology that will force you to rethink the way you back
up your systems.
Although Windows® Server Backup is the only in-the-box backup solution for
Windows Server 2008, it is not a feature-for-feature replacement for NTBACKUP.
The biggest difference is that Windows Server Backup is a disk-to-disk backup
solution; it doesn't support backing up to tape. You can create backup images on
direct-attached disk volumes, on network shares, and even on external USB hard
drives and multi-volume recordable DVDs. But you cannot back up to tape. Just to
be clear, you can still hang a tape drive on a Windows Server 2008 server and
copy the Windows Server Backup-generated backup images to the tape drive—but
you'll have to use someone else's software to do so.
Whereas NTBACKUP is a file-based backup and restore tool, Windows Server
Backup is volume- and block-based. Windows Server Backup deals with its backup
source as a set of volumes, with each volume as a collection of disk blocks. This is
considerably more efficient than backing up files through the file system. Dealing
with backups on a block basis also allows Windows Server Backup to make use of
Volume Shadow Copy Service snapshots to perform block-level incremental
backups, as well as to create snapshots on the target volume to simplify the use of
(and reduce the space used by) multiple backups.
Even if you are doing full backups, Windows Server Backup provides some great
space efficiencies on the target disks. For instance, you might perform multiple full
backups of the same volume. Since Windows Server Backup uses Volume Shadow
Copy Service snapshots on the target disks where it stores the backup images, the
snapshots will only store the blocks that have changed. This substantially reduces
the space used by multiple full backups. This eliminates the need to perform
multiple restore operations to recover an incremental backup. Even though the
snapshot only stores the deltas for each backup, Volume Shadow Copy Service
makes each backup appear complete.
Be aware, though, that you only get the benefits of Volume Shadow Copy Service
snapshots on the target if you back up to a local hard disk—Windows Server
Backup can't perform Volume Shadow Copy Service operations on backups stored
on DVD or network shares.
As an added bonus, Windows Server Backup stores its backup images in
Microsoft® Virtual Hard Disk (VHD) format. You can actually take a backup image
and mount it as a volume in a virtual machine running under Microsoft Virtual
Server 2005. You can simply mount the VHDs in a virtual machine and browse for
a particular file rather than having to perform test restores of tapes to see which
one has the file is on it. (A note of caution: you can't take a backup image and
boot a virtual machine from it. Since the backed-up hardware configuration
doesn't correspond to the virtual machine's configuration, you can't use Windows
Server Backup as a physical-to-virtual migration tool.)
There is a downside to Windows Server Backup's volume- and block-orientation.
Since this new tool looks at the backup source as a set of volumes and blocks, it
doesn't allow you to back up only selected files. You have to back up the entire
volume. And even more problematic, by default you cannot store a backup image
on one of the volumes being backed up (there are some ways to configure around
this; see support.microsoft.com/kb/944530). This has profound implications for
system state backup, as I will discuss later in this article.
Copy Code
Copy Code
(WBADMIN.EXE)
1. Backup service (WBENGINE.EXE)
Splitting the application into a client and a service has several advantages, the
most important being increased reliability. Whether you start a backup from either
the MMC client or the command-line interface, the WBENGINE service is doing the
heavy lifting. The client programs just report the status of the backup. Thus,
terminating the client will not result in a half-baked backup. The client will stop
and the service will continue to completion. Of course, if you really want to stop
the backup, you can, but you must do so explicitly.
The other advantage of this split architecture is that you can use the client to
manage backups on remote machines. This is particularly nice when you have to
back up Windows Server 2008 Core machines.
Windows Server Backup supports bare-metal restores using the Windows Recovery
Environment, or WinRE, which comes on the Windows Server 2008 installation
media. WinRE simplifies the process of recovering a server from scratch. I will
discuss performing a bare-metal restore later in this article. It's worth mentioning
that Windows Server Backup supports several Group Policy settings for managing
backups—these are outlined in the "Group Policy Settings" sidebar.
Figure 1 Disable incremental backups on busy volumes (Click the image for a
larger view)
When the backup is complete, Windows Server Backup takes a snapshot of the
target volume (assuming you are backing up to a locally attached hard disk).
During the next backup, the target VHD files are overwritten. But since Volume
Shadow Copy Service is maintaining shadow copies of the target volume, there
are, in effect, multiple versions of each VHD file corresponding to each of the full
backups. You essentially get multiple full backups for the cost of one full backup
and the changed blocks.
Copy Code
–backuptarget:e:
WBADMIN will then back up the critical system files and application databases to
the target volume, in a folder reserved for system state backups. The system state
backup on a 32-bit Windows Server 2008 domain controller (DC) with a default
directory information tree (DIT) runs a little more than 6GB—this is more than 5GB
larger than on Windows Server 2003 due in part to the fact that Windows Server
Backup is capturing core OS files that NTBACKUP didn't.
The time required to back up the system state is also greater, as you would
expect. These initial numbers, of course, are based on a pre-release version of the
OS. You'll certainly need to test this in your own environment, but it's likely that
you'll need to plan for larger system state backups (and longer backup times)
when you move your domain controllers to Windows Server 2008.
Figure 2 Windows Server Backup MMC (Click the image for a larger view)
As you can see in Figure 3, I can choose whether to back up all the volumes on
the server or back up just the specific volumes that I choose. If I select Full server,
Windows Server Backup will back up all mounted volumes, but I won't have the
option of backing up to a mounted hard drive—instead, I will have to back up to a
recordable DVD or to a network share.
Figure 4 Selecting specific volumes to back up (Click the image for a larger
view)
After I select the destination type (local drive or network share) and specify the
destination, Windows Server Backup prompts me to select either a "VSS copy"
backup or a "VSS full" backup. The terminology is a little confusing, as both
options will back up the selected volumes in their entirety. The difference lies in
the way Windows Server Backup handles the source files after they've been
backed up. If you select the copy option, Windows Server Backup will leave the
backed up files alone. If you choose the full option, Windows Server Backup will
then reset the archive.
Copy Code
C:\> wbadmin start backup –include:c:,d:
–backuptarget:e:
Copy Code
After starting the backup, WBADMIN continues to run and show the progress of the
backup. If I terminate WBADMIN, the backup will continue in the background. I can
then reconnect WBADMIN to a running backup using this command:
Copy Code
C:\> wbadmin get status
Copy Code
Copy Code
C:\> wbadmin enable backup –addtarget:e:
-include:c:,d: -schedule:06:00,12:00,18:00
This command would back up the C: and D: drives to the E: drive three times a
day, at 6:00 A.M., 12:00 P.M., and 6:00 P.M. (note that all times are specified using
a 24-hour clock). To back up all critical system volumes (from which you can
perform a bare metal restore or a system state restore), replace the –include
switch with –allcritical.
You can also use WBADMIN to disable all scheduled backups, like this:
Copy Code
C:\> wbadmin disable backup
This command will delete all the scheduled backup jobs created by the Windows Server Backup
scheduler and release all the backup target volumes for normal use. Note that you can always
use the WBADMIN MMC snap-in to remotely manage the backup and restore activities of Server
Core servers.
Figure 8 Specifying system recovery options (Click the image for a larger
view)
After you select the operating system you want to repair (there is typically only
one choice), WinRE allows you to select the backup from which you want to
restore. By default, WinRE selects the most recent complete system backup, but
you can specify other backups stored on local disks or search the network for
backups that are stored on file shares on other servers.
In my example, I select the most recent complete system backup. The next dialog
(shown in Figure 9) lets me format and repartition all the disks before they are
restored. This is an appropriate option if the problem you are recovering from was
caused by some sort of disk failure or if you've replaced one or more disk drives in
the server.
Figure 9 You can easily format and repartition disks before they're
restored (Click the image for a larger view)
After a couple of confirming dialogs, WinRE starts the restore process and the
server reboots. This is a pretty painless way to perform a bare-metal recovery on a
server.
Copy Code
C:\> bcdedit /set safeboot dsrepair
This will set the safeboot option for the default boot loader entry. In a fresh Windows Server
2008 installation, there is only one boot loader entry, WINLOAD.EXE. To remove the safeboot
option and reboot in normal mode, use this command:
Copy Code
To make things a little easier for yourself, you can configure two bootloader
entries on your DCs—one for a normal boot and one for a DSRM boot. This way,
you can change the boot options using the Startup and Recovery settings dialog
available under System Settings. To add a new bootloader entry, use this
command:
Copy Code
C:\> bcdedit /copy {default}
This action will create a new bootloader entry by copying the default bootloader entry. BCDEDIT
will display something like this:
Copy Code
The GUID identifies the new entry. Then use this command to set the safeboot
option for the new bootloader entry in the BCD:
Copy Code
C:\> bcdedit /set {<GUID for new entry>}
safeboot dsrepair
You can now switch from normal boot mode to DSRM boot mode using the Startup
and Recovery settings (see Figure 10).
Figure 10 Disable incremental backups on busy volumes
Before you use WBADMIN to start a system state restore, you must identify the
backup from which you want to restore. WBADMIN can perform a system state
restore from either a full system backup, a backup that contains just the critical
system volumes, or a system state backup. In any of these cases, you have to
specify the version of the backup you want to use. The easiest way to identify the
backup versions that are available is to use the following WBADMIN command:
Copy Code
C:\> wbadmin get versions
WBADMIN will then display the backup versions in a form similar to the info shown
in Figure 11. Note that each backup has a backup time, backup target, a version
identifier (which, by the way, is the time and date the backup was started in
Universal Mean Time), and a list of the types of recovery operations the backup
can support.
Figure 11 Identify backups available for recovery
Copy Code
In this case, I select the most recent backup and start the system state restore
with this WBADMIN command:
Copy Code
C:\> wbadmin start systemstaterecovery
–version:12/03/2007-18:25
This will perform a non-authoritative restore. If you want to perform an authoritative restore of
the SYSVOL, you can just mark the restored SYSVOL replica as being authoritative by adding
the authsysvol option to the WBADMIN command. For more information on this process, see
go.microsoft.com/fwlink/?LinkId=113152.
Copy Code
ntdsutil: snapshot
snapshot: create
Creating snapshot...
snapshot: quit
ntdsutil: quit
Copy Code
C:\> ntdsutil
ntdsutil: snapshot
1: 2007/12/03:23:18 {42c44414-c099-4f1e-8bd8-4453ef2534a4}
2: C: {c0dd71ba-5bcd-4daf-9fbb-5cfbdd168022}
3: D: {2bbd739f-905a-431b-9449-11fba01f9931}
snapshot: delete 1
snapshot: quit
ntdsutil: quit
C:\>
Copy Code
C:\> ntdsutil
ntdsutil: snapshot
1: 2007/12/03:23:18 {42c44414-c099-4f1e-8bd8-4453ef2534a4}
2: C: {c0dd71ba-5bcd-4daf-9fbb-5cfbdd168022}
3: D: {2bbd739f-905a-431b-9449-11fba01f9931}
snapshot: mount 1
snapshot: quit
ntdsutil: quit
C:\>
The "list all" command lists all the available Active Directory snapshots that are
currently being maintained by Volume Shadow Copy Service. The "mount 1"
command mounts the selected snapshots of the Active Directory DIT and log
volumes and makes them available in the file system. They are located at C:\
$SNAP_200712032318_VOLUMEC$\ and C:\$SNAP_200712032318_VOLUMED$\.
If you look in these folders, you'll see the entire contents of those volumes as they
were when the snapshot was taken. Note, however, that the mounted snapshots
are read-only—meaning you can't modify any of the files in the mounted snapshot.
Copy Code
C:\> dsamain –dbpath
c:\$snap_200712032318_volumed$\ntds\dit
Be sure to back up DCs with application partition replicas if you have defined
them. And consider creating a Windows Recovery Environment partition on your
DCs so you can boot quickly into WinRE in case a critical system drive fails.