IBM Support

Best Practices for Recovering Windows Server 2012 and Windows 8

General Page

This paper provides detailed instructions for creating Automated System Recovery (ASR) based recovery media for the Microsoft Windows Server 2012, Microsoft Windows Server 2012 R2, Microsoft Windows 8 and Microsoft Windows 8.1 operating systems, and using it to perform a full system recovery ("bare metal restore").

This paper provides detailed instructions for creating Automated System Recovery (ASR) based recovery media for the Microsoft Windows Server 2012, Microsoft Windows Server 2012 R2, Microsoft Windows 8 and Microsoft Windows 8.1 operating systems, and using it to perform a full system recovery ("bare metal restore"). See Best Practices for Recovering Windows Server 2008, Windows Server 2008 R2, Windows 7, and Windows Vista for using ASR to recover Windows 2008, Windows 2008 R2, Windows 7, or Windows Vista.

Note: Although the title of this article does not mention Windows Server 2012 R2 or Windows 8.1, the information in this article also applies to those operating systems.

Introduction

ASR is a feature of Microsoft Windows for backing up a system's disk and volume configuration, and restoring it during a bare metal restore operation. ASR has been a feature of Microsoft Windows operating systems since Windows XP. Beginning with Windows Vista and Windows Server 2008, Microsoft integrated ASR with Microsoft Volume Shadowcopy Service (VSS). ASR support for these operating systems was introduced in Tivoli Storage Manager for Windows Backup-Archive client version 6.2.2, at which time ASR was added to the Backup-Archive client's system state backup and restore capabilities. Support for Windows Server 2012 and Windows 8 was introduced in Tivoli Storage Manager for Windows Backup-Archive Client version 6.4.0. Support for Windows Server 2012 R2 and Windows 8.1 was introduced in Tivoli Storage Manager for Windows Backup-Archive Client version 6.4.2.

ASR-based recovery must be performed from within the Windows Preinstallation Environment (WinPE). This paper describes how to create a bootable WinPE CD that includes the Tivoli Storage Manager Backup-Archive client, and how to use the CD to perform a full system recovery.

An alternative method for full recovery of Windows systems using Tivoli Storage Manager is described in another paper, Modified Instructions for Complete Restores of Windows Systems with the TSM Client: Bare Metal Restore (BMR), System State Restore, Windows System Object Restore. This method works well for Windows XP, Windows 2003, and Windows 2003 R2. However, the complexities of restoring later Windows operating systems stretch that method to its limits. Further, Microsoft disclaims support for "online system state restore", which is the basis of that method. Therefore, with one exception, ASR is the recommended "best practice" for performing bare metal restores of Windows Vista, Windows Server 2008, and later Windows operating systems.

The exception to using ASR with Windows operating systems is for 64-bit systems whose firmware interface is based on Extensible Firmware Interface (EFI) rather than Basic Input/Output System (BIOS). EFI-based systems must use the aforementioned "Modified Instructions ..." procedure.

Attention

  • Use client version 6.4.0.0 or higher for backup and restore Windows Server 2012 and Windows 8. Earlier versions of the client do not support Windows Server 2012 or Windows 8.
  • Use client version 6.4.2.0 or higher for backup and restore Windows Server 2012 R2 and Windows 8.1. Earlier versions of the client do not support Windows Server 2012 R2 or Windows 8.1.
  • This recovery method requires the restore target system to have similar hardware as the source system from which the backup was taken. Disk adapters are especially sensitive. If dissimilar hardware is used, the restored system might not be boot.

Creating a bootable WinPE CD

Before you can recover a Windows Server 2012, Windows Server 2012 R2, Windows 8, or Windows 8.1 computer using ASR (Automated System Recovery), you must create a bootable Windows Preinstallation Environment (WinPE) CD or DVD that includes the Tivoli Storage Manager client.

In this task you create a bootable WinPE 4.0 (or 4.1) CD (or DVD) for each of the processor architectures on which you run Microsoft Windows. For example, if you run Windows on x32 and x64 processors, you will need two WinPE CDs: one for x32 systems and another for x64 systems. Use these CDs to recover your Windows computers.

Tip: Instead of using the steps below, use the steps in Creating Bootable WinPE Media for Recovery of Microsoft Windows Server 2016 and Microsoft Windows 10. Despite the title of the article, the resulting WinPE ISO image can be used for recovering Windows Server 2012, Windows Server 2012 R2, Windows 8, and Windows 8.1; the same ISO image can be used for UEFI or BIOS firmware; and the procedure includes a downloadable script that automates the ISO image build process.

Attention: If you embed backup-archive client version 8.1.6 or later, you must use the steps in Creating Bootable WinPE Media for Recovery of Microsoft Windows Server 2016 and Microsoft Windows 10.

1. Prerequisite tasks

a. Install the Microsoft Windows Assessment and Deployment Kit (ADK) for Windows 8 or Windows 8.1. Refer to the Windows ADK documentation for installation instructions. The Windows ADK package is available from Microsoft (https://www.microsoft.com). Search for Windows Assessment and Deployment Kit (ADK) for Windows 8 to find the package.

b. Obtain and install the software of your choice for burning CDs or DVDs.

c. Obtain the Tivoli Storage Manager Backup-Archive client installation package that matches the processor architecture for which you are building the WinPE CD. For example, if you are creating a WinPE DVD for x64 architecture, you will need the Tivoli Storage Manager Backup-Archive client for the x64 architecture.

2. Prepare the minimal operating system

a. Open the Deployment and Imaging Tools Environment command prompt window:

  • If the Windows ADK is installed on Windows 7:

Click Start > All Programs > Windows Kits > Windows ADK. Right-click Deployment and Imaging Tools Environment, and then click Run as administrator. This will open a command prompt window with the current directory being the location of the Windows ADK tools. Perform the next step from this directory.

  • If the Windows ADK is installed on Windows 8 or Windows 8.1:

Go to the Start screen, then All apps. In Windows Kits, right-click Deployment and Imaging Tools Environment, and then click Run as administrator. This will open a command prompt window with the current directory being the location of the Windows ADK tools. Perform the next step from this directory.

b. At the command prompt, run the copype.cmd script that prepares the minimum WinPE operating system. The script requires two arguments: hardware architecture and destination location. The hardware architecture value can be x86 or amd64. The destination value is the path to a local directory. Make sure you specify a directory name that does not already exist; otherwise the script will not run. The script will create the destination directory. For example:

  • For x86 architecture:

copype x86 c:\winpex86
  • For x64 architecture:

copype amd64 c:\winpe_x64

After the script finishes, the current directory in the command prompt will be the destination directory you specified.

Leave the Deployment and Imaging Tools Environment command prompt window open since you will need it for step 4 below.

3.1. Configure the Tivoli Storage Manager Backup-Archive client installation package (7.1.6.0 and later)

Follow this step only if you plan to include backup-archive client version 7.1.6.0 or later. If you plan to include a backup-archive client version that is earlier than 7.1.6.0, follow step 3.2 (below) instead.

a. Do this if you downloaded the IBM Spectrum Protect backup-archive client package from the FTP site or IBM Fix Central. Run the following command from an Windows command prompt (cmd.exe) to extract the installation image to a target directory that does not exist:

For x64 architecture:

n.n.n.n-TIV-TSMBAC-WinX64.exe -otargetdir

For x86 architecture:

n.n.n.n-TIV-TSMBAC-WinX32.exe -otargetdir

where n.n.n.n is the client version number and targetdir is the directory where the installation image is extracted. For example, if you downloaded the version 8.1.0.0 client and you want to extract it to C:\download\tsm8100c:

8.1.0.0-TIV-TSMBAC-WinX64.exe -oC:\download\tsm8100c

b. Use the robocopy command to copy the IBM Spectrum Protect backup-archive client files from the client installation image to the WinPE directory structure. The command arguments include the backup-archive client Program Files 64 or Program Files directory, and the destination location of the WinPE directory structure. The command has this form:

robocopy clientimagedir winpeimagedir\media /e

If you downloaded the client from the FTP site or IBM Fix Central, clientimagedir is the concatenation of the target directory where you extracted the installation image and \TSMClient. For example, if you extracted the installation image to C:\download\tsm8100c then clientimagedir is C:\download\tsm8100c\TSMClient.

If you obtained the client package from Passport Advantage, clientimagedir is the concatenation of the client installation package directory and \TSMCLI_WIN\tsmcli\x64\client\Disk1 for the 64-bit client or \TSMCLI_WIN\tsmcli\x32\client\Disk1 for the 32-bit client.

winpeimagedir is the destination location that you specified in the copype command in step 3.

Examples:

Copy the 8.1.0.0 Passport Advantage installation image at D:\ to the WinPE directory C:\winpe_x64:

robocopy d:\tsmcli_win\tsmcli\x64\client\disk1 c:\winpe_x64\media /e

Copy the 8.1.0.0 FTP installation image at C:\download\tsm8100c to the WinPE directory C:\winpe_x64:

robocopy c:\download\tsm8100c\tsmclient c:\winpe_x64\media /e

Copy the 32-bit 7.1.6.4 FTP installation image at C:\download\tsm7164c to the WinPE directory C:\winpe_x86:

robocopy c:\download\tsm7164c\tsmclient c:\winpe_x86\media /e

c. Change to the media subdirectory of the WinPE directory that you specified in the copype command in step 3. For example:

For x64 architecture:

cd c:\winpe_x64\media

For x86 architecture:

cd c:\winpe_x86\media

d. Run the backup-archive client script that configures the embedded client for use with WinPE.

If you are creating a 64-bit WinPE image:

dsmc-pe-x64 set

If you are creating a 32-bit WinPE image:

dsmc-pe set

e. Issue the following commands to remove unnecessary files and thus reduce the WinPE image size:

For 32-bit WinPE images that use the V7.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q commonappdata issetupprerequisites system32 win windows
dir "program files\tivoli\tsm\baclient\jvm*"
rd /s /q "program files\tivoli\tsm\baclient\jvmxxxxx"

where jvmxxxxx is the directory that is listed in the preceding dir command.

For 64-bit WinPE images that use the V7.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q commonappdata issetupprerequisites system64 win windows
dir "program files 64\tivoli\tsm\baclient\jvm*"
rd /s /q "program files 64\tivoli\tsm\baclient\jvmxxxxx"

where jvmxxxxx is the directory that is listed in the preceding dir command.

For 64-bit WinPE images that use the V8.1 client:

del *.ini *.mst *.msi *.htm *.exe *.spd *.cmd
rd /s /q commonappdata issetupprerequisites ibmspjvm system64 win windows

Go to step 4.

3.2. Configure the Tivoli Storage Manager Backup-Archive client installation package (7.1.4.4 and earlier)

a. Unpack the Tivoli Storage Manager Backup-Archive client installation files into the media subdirectory of the WinPE destination directory you specified in step 2b above.

1. Run the installation package executable file.

2. When prompted for the folder name in which to save the installation files, specify the media subdirectory of the WinPE destination directory you specified in step 2b above. For example, c:\winpe_x64\media.

3. After the installer files are unpacked, the installer will display a language selection dialog or a "Welcome" dialog. Cancel the installation.

b. Run the Tivoli Storage Manager script that prepares the Tivoli Storage Manager client to run in the WinPE environment.

1. Open a new command prompt window and change into the directory where you unpacked the Tivoli Storage Manager installation files:

cd /d c:\winpe_x64\media

2. Run the script.

For x86 architecture:

dsmc-pe set

For x64 architecture:

dsmc-pe-x64 set

Tip: You can substantially reduce the size of the WinPE image by removing the embedded Java Virtual Machine (JVM) that is part of the Tivoli Storage Manager client. The JVM is used by the Tivoli Storage Manager client GUI, which is not supported when running in WinPE. The JVM is located in the Tivoli Storage Manager client installation directory structure that you just unpacked into the media subdirectory, specifically under the baclient directory.

For x86 architecture:

c:\winpe_x64\media\program files\tivoli\tsm\baclient

For x64 architecture:

c:\winpe_x64\media\program files 64\tivoli\tsm\baclient

To remove the JVM, simply delete the directory (including its child files and directories) named jvmnnnnn, where nnnnn is a series of numeric digits. The actual value for nnnnn will depend on which Tivoli Storage Manager client version you are using.

4. Add Windows Management Instrumentation (WMI) to the WinPE ISO image and increase the size of the WinPE X: drive

You must add WMI to the WinPE image when either of the following conditions is true.

  • The included backup-archive client version is 7.1.8.0 or later 7.1 level
  • The included backup-archive client version is 8.1.2.0 or later

However, even if you do not include a client version that requires WMI, consider following steps a, d, and e, to increase the size of the WinPE X: drive. The larger drive is useful for collecting diagnostic data during troubleshooting.

The AIK tool Dism.exe is used in this step. Issue the following commands, replacing c:\winpeimagedir  with the WinPE destination directory, and platform with amd64 or x86, depending on the processor architecture of your WinPE image. This step assumes that the AIK is installed in its default location on the C: drive. If you installed the AIK to a different location, you will need to modify the /packagepath option in step b accordingly.

a. Mount the WinPE image:

dism /mount-wim /wimfile:"c:\winpeimagedir\media\sources\boot.wim" /index:1 /mountdir:"c:\winpeimagedir\mount"

b. Add the WMI packages to the image:

dism /image:"c:\winpeimagedir\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\platform\WinPE_OCs\WinPE-WMI.cab"
dism /image:"c:\winpeimagedir\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\platform\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"

c. Verify that the packages were added successfully:

dism /image:"c:\winpeimagedir\mount" /get-packages

The expected output looks similar to this:

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Packages listing:

Package Identity : Microsoft-Windows-WinPE-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514
State : Install Pending
Release Type : Language Pack
Install Time : 11/20/2010 4:04 PM

Package Identity : Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~6.1.7601.17514
State : Install Pending
Release Type : Foundation
Install Time : 11/20/2010 4:01 PM

Package Identity : WinPE-WMI-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514
State : Install Pending
Release Type : Language Pack
Install Time : 11/9/2017 3:12 PM

Package Identity : WinPE-WMI-Package~31bf3856ad364e35~amd64~~6.1.7601.17514
State : Install Pending
Release Type : Feature Pack
Install Time : 11/9/2017 3:12 PM

The operation completed successfully.

d. When you boot WinPE, the operating system runs in a virtual RAM drive, X:. By default, the drive size is 32 MB. You can optionally increase the size of the drive to 64 MB, 128 MB, 256 MB, or 512 MB. A larger drive is helpful when you need to collect diagnostic information for troubleshooting.

Run the following command to change the drive size, where nnn is 64, 128, 256, or 512:

dism /image:"c:\winpeimagedir\mount" /set-scratchspace:nnn

Then run this command to verify the size:

dism /image:"c:\winpeimagedir\mount" /get-scratchspace

The expected output looks similar to the following lines. In this example, the value specifed in the /set-scratchspace parameter was 512:

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Configured scratch space on the Windows PE system volume:

Scratch Space : 512MB

The operation completed successfully.

e. Unmount the image:

dism /unmount-wim /mountdir:"c:\winpeimagedir"\mount /commit

Tip: If you make any mistakes and want to cancel the changes, replace /commit with /discard. Then you can repeat this step from the beginning.

Examples:

For x86 architecture:

dism /mount-wim /wimfile:"c:\winpe_x86\media\sources\boot.wim" /index:1 /mountdir:"c:\winpe_x86\mount"
dism /image:"c:\winpe_x86\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\WinPE-WMI.cab"
dism /image:"c:\winpe_x86\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
dism /image:"c:\winpe_x86\mount" /get-packages
dism /image:"c:\winpe_x86\mount" /set-scratchspace:512
dism /image:"c:\winpe_x86\mount" /get-scratchspace
dism /unmount-wim /mountdir:"c:\winpe_x86\mount" /commit

For x64 architecture:

dism /mount-wim /wimfile:"c:\winpe_x64\media\sources\boot.wim" /index:1 /mountdir:"c:\winpe_x64\mount"
dism /image:"c:\winpe_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-WMI.cab"
dism /image:"c:\winpe_x64\mount" /add-package /packagepath:"C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
dism /image:"c:\winpe_x64\mount" /get-packages
dism /image:"c:\winpe_x64\mount" /set-scratchspace:512
dism /image:"c:\winpe_x64\mount" /get-scratchspace
dism /unmount-wim /mountdir:"c:\winpe_x64\mount" /commit

5. Create the WinPE ISO image

From the Deployment and Imaging Tools Environment, command prompt window, use the Microsoft oscdimg utility that comes with the Windows ADK to create the WinPE ISO image. You will need to specify the WinPE destination directory specified in step 2b above and a target file name for the ISO image. The command syntax is:

oscdimg -m -n -o -bwin_pe_directory\fwfiles\etfsboot.com win_pe_directory\media destination_iso_file

For example, if the WinPE destination directory is C:\winpe_x64 and you want to create an ISO image named C:\winpe_x64.iso, enter this command:

oscdimg -m -n -o -bc:\winpe_x64\fwfiles\etfsboot.com c:\winpe_x64\media c:\winpe_x64.iso

6. Burn the ISO image to a CD or DVD

Use the software of your choice to burn the ISO image to a CD (or DVD).

The bootable WinPE CD contains a minimum operating system and Tivoli Storage Manager client. Use this CD or DVD when restoring a computer with ASR recovery.

Note: A bootable USB flash drive that contains the ISO image cannot be used to restore the operating system with ASR. You must use a CD or DVD; or if you are restoring a virtual guest, you can use the ISO image file by connecting it to that virtual guest's CD drive.

Restoring the system

Use this procedure only when you need to perform a full recovery of the system ("bare metal restore").

1. Prerequisite tasks

a. Create a bootable Windows Preinstallation Environment (WinPE) CD or DVD that includes the Tivoli Storage Manager client as described above in Creating a bootable WinPE CD.

Note: A bootable USB flash drive that contains the ISO image cannot be used to restore the operating system with ASR. You must use a CD or DVD; or if you are restoring a virtual guest, you can use the WinPE ISO image file by connecting it to that virtual guest's CD drive.

b. Identify the following Backup-Archive client option values needed for connecting to the Tivoli Storage Manager server:

  • tcpserveraddress: The TCP/IP domain name or numeric IP address of the TSM server from which the system will be restored
  • tcpport: The TCP/IP port number of the TSM server from which the system will be restored
  • nodename: The name of the Tivoli Storage Manager client node for the system to be restored
  • password: The password for the Tivoli Storage Manager client node

If you do not know the password for the client node, ask your Tivoli Storage Manager server administrator to change the node password, then let you know what the new password is.

2. Start the computer with the WinPE CD or DVD.

Insert the CD (or DVD) and start the computer. Be sure that the computer boots from the CD.

After the system starts, a Windows command prompt window will be displayed. It will show that a command called wpeinit is started. When wpeinit completes, the current directory X:\windows\system32 will be displayed, awaiting your input. Proceed with the next step.

3. Test network connectivity

Use the ping command to test network connectivity. For example, if your Tivoli Storage Manager server's IP address is 10.0.1.73, you can issue ping 10.0.1.73 to verify that the server is reachable:

X:\windows\system32>ping 10.0.1.73

Pinging 10.0.1.73 with 32 bytes of data:
Reply from 10.0.1.73: bytes=32 time=20ms TTL=128
Reply from 10.0.1.73: bytes=32 time=3ms TTL=128
Reply from 10.0.1.73: bytes=32 time=3ms TTL=128
Reply from 10.0.1.73: bytes=32 time=3ms TTL=128

Ping statistics for 10.0.1.73:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 20ms, Average = 7ms

X:\windows\system32>

Proceed to step 4 if the Tivoli Storage Manager server is reachable.

If the Tivoli Storage Manager server is not reachable, it could be because DHCP is not available. In this case, you need to configure a static IP address. To configure a static IP address, you will need these elements:

  • The name of the network interface
  • A valid, unique IP address that you can use on the network
  • The network subnet mask
  • The network gateway address

Your network administrator can provide correct values. netsh int show interface can be used to identify available network interfaces. Once you know these values, use the netsh command to configure a static IP address. For example, given these values:

  • Network interface: Ethernet0
  • IP address: 10.0.1.37
  • Subnet mask: 255.255.255.0
  • Network gateway: 10.0.0.1

Use this command to configure the static IP address:

netsh int ip set address "Ethernet0" static 10.0.1.37 255.255.255.0 10.0.0.1

Repeat the ping test above to verify connectivity. If the Tivoli Storage Manager server is still unreachable, the restore cannot proceed. In this case, consult your network engineers for further assistance.

4. Identify the CD or DVD drive letter and, if necessary, change it

Identify the drive letter that corresponds to your WinPE CD or DVD and, if necessary, change it to a different drive letter. You need to change the drive letter if the current drive letter is the same as a drive you intend to restore. Use the Windows DISKPART utility, included with WinPE, to perform this step.

This example shows how to start DISKPART to identify the drive letter of the WinPE CD or DVD. If the drive letter is the same as a drive that you are restoring, then the drive letter must be changed.

a. Start DISKPART, then use the LIST VOLUME command to display the available volumes.

X:\windows\system32>diskpart

Microsoft DiskPart version 6.2.9200
Copyright (C) 1999-2012 Microsoft Corporation.
On computer: MININT-DQU94T9

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info    
  ----------  ---  -----------  -----  -------     -------  -------    --------
  Volume 0     E   CD_ROM       CDFS   DVD-ROM      610 MB  Healthy
  Volume 1     C   System Rese  NTFS   Partition    100 MB  Healthy
  Volume 2     D                NTFS   Partition     19 GB  Healthy

DISKPART>

The above output shows the CD or DVD drive letter is E: and it is on volume 0.

b. If you are not restoring a volume that is assigned to E:, you can skip this step and proceed to step 4c.

If you are restoring a volume that is assigned to E:, use the SELECT VOLUME and ASSIGN LETTER commands to change the drive letter of the CD or DVD drive to a drive letter that you are not restoring. In this example, the CD drive letter E: is changed to Z:.

DISKPART> select volume 0

Volume 0 is the selected volume.

DISKPART> assign letter=z

DiskPart successfully assigned the drive letter or mount point.

DISKPART>

c. Exit the DISKPART utility.

Use the EXIT command to exit the DISKPART utility.

DISKPART> exit

Leaving DiskPart...

X:\windows\system32>

5. Configure environment variables

In this step, you configure the Tivoli Storage Manager Backup-Archive client environment variables DSM_DIR, DSM_CONFIG, and DSM_LOG. You also add the Backup-Archive client directory to the Windows PATH environment variable.

  • Set DSM_DIR to the directory on the WinPE CD or DVD that contains the Backup-Archive client command line interface (dsmc.exe).
  • Set DSM_CONFIG to the fully qualified path of the Backup-Archive client options file (dsm.opt). You can create a file on the X: drive, or use a file on a USB drive or mapped network drive.
  • Set DSM_LOG to the directory where the Backup-Archive client error log file, dsmerror.log, is created. This can be the root (or other directory) on the X: drive, a USB drive that you attach to the system, or a network drive that you map with the Windows net use command.
  • Append to PATH the directory on the WinPE CD or DVD that contains the Backup-Archive client command line interface (dsmc.exe).
  • Append to PATH the IBM GSKit directories (required only for backup-archive client version 7.1.8.0 and later 7.1 levels, and backup-archive client version 8.1.2.0 and later)

Note: Do not put quotation marks around path names, even if the path names contain blank spaces.

The following examples assume that the WinPE CD or DVD drive letter is E:, that you will use a dsm.opt file on the X: drive, and that you will write the dsmerror.log file to the root of the X: drive.

  • For x86 architecture:
set DSM_DIR=e:\program files\tivoli\tsm\baclient
set DSM_CONFIG=x:\dsm.opt
set DSM_LOG=x:\
set PATH=%PATH%;%DSM_DIR%
set PATH=%PATH%;e:\Common\Tivoli\tsm\api\gsk8\bin;e:\Common\Tivoli\TSM\api\gsk8\lib
  • For x64 architecture:
set DSM_DIR=e:\program files 64\tivoli\tsm\baclient
set DSM_CONFIG=x:\dsm.opt
set DSM_LOG=x:\
set PATH=%PATH%;%DSM_DIR%
set PATH=%PATH%;e:\Common64\Tivoli\tsm\api64\gsk8\bin;e:\Common64\Tivoli\TSM\api64\gsk8\lib64

6. Configure a simple Backup-Archive client options file (dsm.opt)

The only required options are tcpserveraddress, and nodename. The tcpport option is needed if your Tivoli Storage Manager server port number is not 1500. You can also add the password option if you want to store the password in the dsm.opt file, or you can use the passwordaccess generate option to store the password in the WinPE registry. If you are using an options file on a USB drive or a mapped network drive, ensure that the WinPE system can access the file.

Example dsm.opt file:

tcpserveraddress 10.0.1.73
tcpport 1600
nodename mail123
passwordaccess generate

Note: If your dsm.opt file does not include the password option, you will be asked to provide the password for the node when the Backup-Archive client contacts the Tivoli Storage Manager server. If you are using the passwordaccess generate option, the password will be encrypted into the WinPE system's registry so you do not need to enter it again. Otherwise you will be prompted to enter the password each time you start the Backup-Archive client.

Tip: If you are performing a disaster recovery test using your production Tivoli Storage Manager server, use the virtualnodename option instead of nodename. When prompted for a user ID, enter an administrator ID with system, policy, or client owner authority for the node whose data you are restoring. When prompted for a password, enter the administrator ID's password. This will avoid potential password synchronization issues between the production node name and the production Tivoli Storage Manager server.

7. Configure the backup-archive client to connect to server version 7.1.8 or later 7.1 level, or 8.1.2 or later

Follow this step only when both of the following conditions are true:

  • The backup-archive client version is 7.1.8.0 or later 7.1 level, or 8.1.2.0 or later
  • The server version is 7.1.8.0 or later 7.1 level, or 8.1.2.0 or later

If both of the above conditions are true, then do either alterantive a or alternative b.

alternative a. From another working backup-archive client that connects to the same IBM Spectrum Protect server, copy files dsmcert.kdb and dsmcert.sth to the root of the WinPE system's X: drive. For example, you can use the Windows net use command to map another drive to an unused drive letter, then copy the files to the root of X:. The dsmcert.kdb and dsmcert.sth files are located in the baclient directory of the working backup-archive client. For example, the default installation directory for the backup-archive client is C:\Program Files\Tivoli\TSM\baclient. Make sure you change the current directory to the root of X: before doing step 8.

alternative b. Ask your IBM Spectrum Protect server administrator to use the following administrative command to change the node's SESSIONSECURITY setting to TRANSITIONAL. The first time the client connects, the setting will revert to STRICT.

update node nodename sessionsecurity=transitional

8. Verify that the Backup-Archive client can connect to the Tivoli Storage Manager server

Use the command dsmc query session to perform this step. If successful, you will see messages showing the Tivoli Storage Manager server version and other connection information. If a connection cannot be established, review the error messages to determine the corrective steps. Proceed to the next step after you have verified a successful connection.

9. Start a new instance of the Windows command prompt

Issue the following command:

start cmd.exe

After the new command prompt instance has been created, switch back to the original command prompt. The new instance will be used in step 10.

10. Start the system state restore

Use the command dsmc restore systemstate to restore the system state:

dsmc restore systemstate

Tip: In a WinPE environment, hardware acceleration is not available. This means that text will not scroll very quickly in the command prompt window, resulting in slower restore speed. There are several ways to avoid this issue:

1. Minimize the window in which the restore runs until the restore completes. The disadvantage is that you will not be able to see when the restore completes. However you can periodically bring the window back to the desktop, check the status, then minimize the window again.

2. Use the second command prompt that you initiated in step 8 to overlay most of the command prompt in which the restore runs. Leave the last line of text uncovered in the restore command prompt so you can monitor progress. This will not significantly affect the restore operation.

3. Re-direct the restore command output to a file such as:

dsmc restore systemstate > x:\sysstate_restore.txt 2>&1

This tip is also applicable to the restore operations described in the rest of this procedure.

11. Make a copy of the restored tsmvolmap.txt file

While the system state restore is running, change to the second command prompt that you initiated in step 8. From this second command prompt, issue this command:

  • If you are using Tivoli Storage Manager Backup-Archive Client version 6.4:
copy %temp%\~adsm.sys\adsm.sys\vss_staging\asr\tsmvolmap.txt x:\
  • If you are using Tivoli Storage Manager Backup-Archive Client version 7.1:
copy "%temp%\~adsm.sys\program files\tivoli\tsm\baclient\adsm.sys\vss_staging\asr\tsmvolmap.txt" x:\

Note: Beginning with version 7.1 of the Tivoli Storage Manager Backup-Archive Client, the default location of the VSS_STAGING directory was changed to installdir\adsm.sys where installdir is the location of the Tivoli Storage Manager Backup-Archive Client's baclient directory. If you installed the Tivoli Storage Manager Backup-Archive Client to a different directory or if you used the VSSALTSTAGINGDIR option during backup to specify an alternate location for the VSS_STAGING directory, then you must adjust the above copy command accordingly.

Examples:

If you installed the Tivoli Storage Manager Backup-Archive Client to G:\TSM and you did not use the VSSALTSTAGINGDIR option during the backup:

copy "%temp%\~adsm.sys\tsm\baclient\adsm.sys\vss_staging\asr\tsmvolmap.txt" x:\

If you set the VSSALTSTAGINGDIR option to G:\TSMBkup during the backup:

copy "%temp%\~adsm.sys\tsmbkup\vss_staging\asr\tsmvolmap.txt" x:\

If you set the VSSALTSTAGINGDIR option to U:\ during the backup:

copy "%temp%\~adsm.sys\vss_staging\asr\tsmvolmap.txt" x:\

Tip: tsmvolmap.txt is restored during the initial phase of system state restore. If the file cannot be found, wait a few moments, then try again. This file will be used with the next step. If you have trouble finding the tsmvolmap.txt file, try the dir command:

dir /s "%temp%\~adsm.sys\tsmvolmap.txt

After copying the file, change to the first command prompt and wait for completion of the system state restore operation.

Note: Warning message ANS1997W might be displayed one or more times during the system state restore. This message can be ignored. Examples of messages that can be ignored:

11/14/2011 18:55:58 ANS1997W No files have been previously backed up for the VSS component 'ASR'.
11/14/2011 18:55:58 ANS1997W No files have been previously backed up for the VSS component 'Volume{2da19e9b-0bf1-11e1-8385-806e6f6e6963}'.
11/14/2011 18:55:59 ANS1997W No files have been previously backed up for the VSS component 'Volume{2da19e9c0bf1-11e1-8385-806e6f6e6963}'.
11/14/2011 18:55:59 ANS1997W No files have been previously backed up for the VSS component 'harddisk0'.

Note: During the first part of the system state restore, ASR creates and formats critical partitions for the computer. A critical partition is the partition that is critical for the operating system to function. For example, if the operating system is installed on the C: drive, then the partition containing the C: drive is critical.

12. Mount all drives.

Use the MOUNTVOL command to mount all drives.

a. Issue the command MOUNTVOL. The output includes a list of volume GUIDs (Globally Unique Identifiers) and the drive letter on which each volume is mounted, if any. Example:

\\?\Volume{2da19e9b-0bf1-11e1-8385-806e6f6e6963}\
    *** NO MOUNT POINTS ***

\\?\Volume{c7616352-0ed6-11e1-9bff-000c29a34b32}\
    *** NO MOUNT POINTS ***

\\?\Volume{2da19e9c-0bf1-11e1-8385-806e6f6e6963}\
    *** NO MOUNT POINTS ***

\\?\Volume{c761634b-0ed6-11e1-9bff-000c29a34b32}\
    *** NO MOUNT POINTS ***

\\?\Volume{d9b257fc-684e-4dcb-ab79-03cfa2f6b750}\
    X:\

\\?\Volume{f403ba1e-0f1e-19e1-96dc-806e6f6e6963}\
    A:\

\\?\Volume{f403ba12-0f1e-19e1-96dc-806e6f6e6963}\
    Z:\

b. Examine the tsmvolmap.txt file you copied to the X: drive in step 10. Example content of tsmvolmap.txt:

\?|\\?\Volume{2da19e9b-0bf1-11e1-8385-806e6f6e6963}\|1
D:|\\?\Volume{c761634b-0ed6-11e1-9bff-000c29a34b32}\|0
C:|\\?\Volume{2da19e9c-0bf1-11e1-8385-806e6f6e6963}\|1
E:|\\?\Volume{c7616352-0ed6-11e1-9bff-000c29a34b32}\|0

Each line in the tsmvolmap.txt file consists of a drive letter, a volume GUID, and number, separated by vertical bar characters '|'. If a line contains no drive letter (?) then the volume was not mounted to a drive letter at the time the system state was backed up. In the above example you can see that there is one unmounted ("hidden") volume, and three volumes mounted on drive letters C:, D:, and E:.

Note: Not all systems have the hidden volume. It is normal if your system does not have a hidden volume.

Verify that for each GUID in the tsmvolmap.txt file, there is a corresponding GUID in the MOUNTVOL output from step 11a.

c. Mount each volume associated with a drive letter.

Use the MOUNTVOL command to mount each volume associated with a drive letter. Using the example tsmvolmap.txt from step 11b, the commands are:

mountvol c:\ \\?\Volume{2da19e9c-0bf1-11e1-8385-806e6f6e6963}\
mountvol d:\ \\?\Volume{c761634b-0ed6-11e1-9bff-000c29a34b32}\
mountvol e:\ \\?\Volume{c7616352-0ed6-11e1-9bff-000c29a34b32}\

If you have a hidden volume, it will be used in step 13.

13. Restore the boot drive

Restore the boot drive using the dsmc restore command. This is the drive that contains the operating system files, usually C:. In the following example, the C: drive is backed up to file space \\mail123\c$. Use the dsmc query filespace command to determine the file space names if you are not sure of them. Use the -subdir=yes and -replace=no options.

dsmc restore \\mail123\c$\ c:\ -subdir=yes -replace=no

14. Copy bootmgr to the hidden partition

In Windows Vista, and in subsequent releases of Microsoft Windows, the operating system installation might create a hidden bootable partition to store boot data. The hidden partition is different from the partition for the system drive. If the system originally had a hidden partition, then it is restored when ASR data is restored during the system state restore. Copy the bootmgr file to the hidden partition. The hidden partition does not have a drive letter mapping, so you must use the GUID format for the destination drive in the copy command. You can distinguish the hidden partition from other partitions because it has a size of 100 or 200 MB.

If in step 11 you determined that your system does not have a hidden volume, proceed to step 14. Otherwise continue with this step.

Copy file C:\windows\Boot\PCAT\bootmgr to the hidden partition. In the following example, the GUID for the hidden partition is \\?\Volume{2da19e9b0bf1-11e1-8385-806e6f6e6963}\.

copy c:\windows\boot\pcat\bootmgr \\?\Volume{2da19e9b-0bf1-11e1-8385-806e6f6e6963}\

15. Restore the other volumes.

If additional volumes were backed up, restore them now. For example, if drives D: and E: were also backed up, restore them using the dsmc restore command. Also use the -subdir=yes and -replace=no options:

dsmc restore \\mail123\d$\ d:\ -subdir=yes -replace=no
dsmc restore \\mail123\e$\ e:\ -subdir=yes -replace=no

16. Restart the computer

Remove the CD or DVD, then restart the computer. The restore is complete.

Tip: During the first restart following the restore, you might see the Windows Error Recovery dialog that indicates the system did not shut down correctly. This is normal because the system was in a running state at the time the backup was made. You can select the Start Windows Normally option.

Additional restore scenarios

Performing a non-authoritative restore of a cluster node (Windows Server 2012 and Windows Server 2012 R2)

Perform the steps outlined in Restoring the system. After the system state and drives are restored and the system is rebooted, it should rejoin the existing cluster.

Performing an authoritative restore of a cluster node (Windows Server 2012 and Windows Server 2012 R2)

a. Perform the steps outlined in Restoring the system. After the system state and drives are restored and the system is rebooted, it should rejoin the existing cluster.

b. From the Tivoli Storage Manager Backup-Archive Client command line interface, issue this command:

restore systemstate clusterdb

Troubleshooting

Common problems when using ASR to recover VMware guests

The recovery procedures described in this document can be used for Microsoft Windows operating systems that run as VMware guests. Note that even when running Windows in a virtual machine, the restore target must have similar hardware as the backup source. Here are some common problems to avoid:

  • Problem: The backup source and restore target virtual machines are created using different VMware virtual hardware levels.

Solution: Ensure that the restore target virtual machine is created with the same VMware virtual hardware levels as the backup source.

  • Problem: The backup source and restore target virtual machines are created on different VMware host servers running different versions of VMware software.

Solution: Ensure that the VMware host for the restore target has the same version of VMware software as the backup source.

  • Problem: The backup source and restore target virtual machines are created with different types of hardware.

Solution: Ensure that the restore target is created with hardware that matches that of the backup source. It is especially critical to ensure that the virtual storage adapter device type of the restore target matches that of the backup source.

If you encounter problems using ASR to recover virtual machines, it is recommended that you look for critical differences between the machine configuration files (.vmx files) of the backup source and restore target.

ANS1459E VSS Automated System Recovery (ASR) failed.

This message indicates that a problem was encountered during the first phase of system state restore, which invokes ASR functions to prepare the disks for the remainder of the recovery operation. This message is typically issued when an error occurs in the ASR functions. When ANS1459E is issued, examine the dsmerror.log file for further details about the error.

  • Problem: The error log contains these messages related to InitializeForRestore():

07/02/2012 08:49:21 ANS5250E An unexpected error was encountered.
   TSM function name : InitializeForRestore()
   TSM function      : 'InitializeForRestore() failed with error code . -2147212542'
   TSM return code   : -21472125423
   TSM file          : asrutil.cpp (1523)
07/02/2012 08:49:21 ANS1459E VSS Automated System Recovery (ASR) failed.

A failure in InitializeForRestore() is indicative of a potential problem with the TSM_Backup.xml file. This can occur when the system was backed up with a client version that does not support ASR recovery.

Solution: Ensure that the system was backed up with client level 6.2.2 or later. See "Best practice" in the "Prerequisite tasks" section above for the recommended minimum client version.

  • Problem: The error log contains these messages related to PostRestore():

06/18/2012 19:02:23 ANS5250E An unexpected error was encountered.
   TSM function name : PostRestore()
   TSM function      : 'PostRestore() failed with error VSS_E_BAD_STATE. -2147212543'
   TSM return code   : -2147212543
   TSM file          : asrutil.cpp (1696)
06/18/2012 19:02:23 ANS1459E VSS Automated System Recovery (ASR) failed.

A failure in PostRestore() is indicative of an ASR failure to configure the restore target disks according to the backup source disk information in the TSM_Backup.xml file.

Solution: Ensure that the target disk hardware is as identical as possible to the source disk hardware. This includes the number of disks, type of disks (SCSI versus IDE), size of disks, and disk geometry. For example, this failure can occur if the source disk geometry is 32 sectors per track and the target disk geometry is 63 sectors per track.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEQVQ","label":"IBM Spectrum Protect"},"Component":"Backup-Archive Client","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
03 July 2023

UID

ibm16047698