IBM Tivoli Storage Manager Extended Edition, Version 7.1

Disaster recovery mode stanza

The RECOVERY.SCRIPT.DISASTER.RECOVERY.MODE stanza contains a script with the commands needed to recover the server.

RECOVERY.SCRIPT.DISASTER.RECOVERY.MODE
You can use the script as a guide and run the commands from a command line. Or you can copy it to a file, modify it and the files it refers to, and run the script.
Tip: The commands in the plan file that is generated by DRM might not work on your replacement systems. If necessary, use the recovery.instructions stanzas in the plan file to store information about the particular commands to be used during recovery from an actual disaster. Enter your site-specific information in the recovery.instructions stanzas when you first create the plan file or after you test it.
At the completion of these steps, client requests for file restores are satisfied directly from copy storage pool volumes and active-data pool volumes.

The disaster recovery plan issues commands by using the administrative client. AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems The disaster recovery plan file issues commands by using the administrative client. Ensure that the path to the administrative client is established before running the script. For example, set the shell variable PATH or update the scripts with the path specification for the administrative client.

The commands in the script do the following:
  • Restore the server options, volume history, and device configuration information files.
  • Invoke the macros contained in the following stanzas:
    • LICENSE.REGISTRATION
    • COPYSTGPOOL.VOLUMES.AVAILABLE
    • COPYSTGPOOL.VOLUMES.DESTROYED
    • ACTIVEDATASTGPOOL.VOLUMES.AVAILABLE
    • ACTIVEDATASTGPOOL.VOLUMES.DESTROYED
    • PRIMARY.VOLUMES.DESTROYED.
Windows operating systems Note: Because this script invokes the administrative command-line client, ensure that the communications options in the administrative client options file are set to communicate with the recovered server before running this script. To review the communications options used in the recovered server, see the server options file in the DSMSERV.OPT.FILE stanza.
To invoke this script, specify the following positional parameters:
  • Windows operating systems %1 (the administrator ID)
  • Windows operating systems %2 (the administrator password)
  • AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems $1 (the administrator ID)
  • AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems $2 (the administrator password)
  • AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems $3 (the server ID as specified in the dsm.sys file)
    Note: The default location for dsm.sys is HP-UX operating systems Linux operating systems Oracle Solaris operating systems /opt/tivoli/tsm/client/admin/bin.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems For example, to invoke this script by using an administrator ID of don, password of mox, server name of prodtsm, enter the following command:
planprefix⁄RECOVERY.SCRIPT.DISASTER.RECOVERY.MODE don mox prodtsm
Windows operating systems For example, to invoke this script by using an administrator ID of don and a password of mox, enter the following command:

Windows operating systems
planprefixRECOVERY.SCRIPT.DISASTER.RECOVERY.MODE don mox

For more information, see the entry for the recovery plan prefix in Table 1.

begin RECOVERY.SCRIPT.DISASTER.RECOVERY.MODE script

@echo off

 rem Purpose: This script contains the steps required to recover the server
 rem   to the point where client restore requests can be satisfied
 rem   directly from available copy storage pool volumes.
 rem Note: This script assumes that all volumes necessary for the restore have 
 rem   been retrieved from the vault and are available. This script assumes
 rem   the recovery  environment is compatible (essentially the same) as the
 rem   original. Any deviations require modification to this script and the
 rem   macros and scripts it runs. Alternatively, you can use this script
 rem   as a guide, and manually execute each step.

if not %1.==. if not %2.==. goto start
 echo Specify the following positional parameters:
 echo administrative client ID and password.
 echo Script stopped.
 goto end
:start

 rem Set the server working directory.
pushd "D:\tsm\server1\"

 rem Restore server options, volume history, device configuration files.
copy "D:\TSM\SERVER1\PLANPRE.DSMSERV.OPT.FILE" "D:\TSM\SERVER1\DSMSERV.OPT"
copy "D:\TSM\SERVER1\PLANPRE.VOLUME.HISTORY.FILE" "D:\TSM\SERVER1\VOLHIST.OUT"
copy "D:\TSM\SERVER1\PLANPRE.DEVICE.CONFIGURATION.FILE" "D:\TSM\SERVER1\DEVCNFG.OUT"

 rem Make sure db storage paths exist.
mkdir "E:\tsmdata\DBSpace" 

 rem Restore the server database to latest version backed up per the 
 rem volume history file.
"D:\TSM\SERVER\DSMSERV" -k "Server1" restore db todate=09/26/2008 totime=13:28:52 +
source=dbb

rem "D:\TSM\SERVER\DSMSERV" -k "Server1" restore db todate=09/26/2008 totime=13:28:52 +
source=dbb on="D:\TSM\SERVER1\PLANPRE.DB.STORAGEPATHS" activelogdirectory="H:\tsmdata\Alog"

 rem Start the server.
start "Server1" "D:\TSM\SERVER\DSMSERV" -k "Server1" 
echo Wait for the server to start. Ensure that the Administrative command
echo line client option file is set up to communicate with this server, then
echo press enter to continue recovery script execution.
pause

 rem Set the administrative command line client directory.
pushd "D:\tsm\Server\tsmdiag"
set DSM_DIR=D:\tsm\Server\tsmdiag

 rem Register the Server Licenses.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.LICENSE.REGISTRATION.LOG" macro + 
"D:\TSM\SERVER1\PLANPRE.LICENSE.REGISTRATION.MAC"
 rem Tell the server these active-data pool volumes are available for use.
 rem Recovery Administrator: Remove from macro any volumes not obtained from vault.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.ACTIVEDATASTGPOOL.VOLUMES.AVAILABLE.LOG" + 
macro "D:\TSM\SERVER1\PLANPRE.ACTIVEDATASTGPOOL.VOLUMES.AVAILABLE.MAC"

 rem Active-data pool volumes in this macro were not marked as 'offsite' at the time
 rem PREPARE ran. They were likely destroyed in the disaster.
 rem Recovery Administrator: Remove from macro any volumes not destroyed.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.ACTIVEDATASTGPOOL.VOLUMES.DESTROYED.LOG" + 
macro "D:\TSM\SERVER1\PLANPRE.ACTIVEDATASTGPOOL.VOLUMES.DESTROYED.MAC"

 rem Tell the server these copy storage pool volumes are available for use.
 rem Recovery Administrator: Remove from macro any volumes not obtained from vault.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.COPYSTGPOOL.VOLUMES.AVAILABLE.LOG" + 
macro "D:\TSM\SERVER1\PLANPRE.COPYSTGPOOL.VOLUMES.AVAILABLE.MAC"

 rem Copy storage pool volumes in this macro were not marked as 'offsite' at the time
 rem PREPARE ran. They were likely destroyed in the disaster.
 rem Recovery Administrator: Remove from macro any volumes not destroyed.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.COPYSTGPOOL.VOLUMES.DESTROYED.LOG" + 
macro "D:\TSM\SERVER1\PLANPRE.COPYSTGPOOL.VOLUMES.DESTROYED.MAC"

 rem Mark primary storage pool volumes as ACCESS=DESTROYED.
 rem Recovery administrator: Remove from macro any volumes not destroyed.
dsmadmc -id=%1 -pass=%2 -ITEMCOMMIT + 
-OUTFILE="D:\TSM\SERVER1\PLANPRE.PRIMARY.VOLUMES.DESTROYED.LOG" + 
macro "D:\TSM\SERVER1\PLANPRE.PRIMARY.VOLUMES.DESTROYED.MAC"

 rem Restore the previous working directory.
popd

 rem Restore the previous working directory.
popd

:end
end RECOVERY.SCRIPT.DISASTER.RECOVERY.MODE script


Feedback