PREPARE (Create a recovery plan file)

Use this command to create a recovery plan file, which contains the information that is needed to recover a Tivoli® Storage Manager server. You can store a recovery plan file on a file system that is accessible to the source Tivoli Storage Manager server or on a target Tivoli Storage Manager server.

You can use the QUERY ACTLOG command to view whether the PREPARE command was successful.

You can also view this information from the server console or, if the WAIT parameter equals YES, an administrative client session.

Privilege class

To issue this command, you must have system privilege.

Syntax

Read syntax diagramSkip visual syntax diagram
            .-Source--=--DBBackup-------.   
>>-Prepare--+---------------------------+----------------------->
            '-Source--=--+-DBBackup---+-'   
                         '-DBSnapshot-'     

>--+--------------------------------+--------------------------->
   '-DEVclass--=--device_class_name-'   

>--+-----------------------+--+------------------------+-------->
   '-PLANPrefix--=--prefix-'  '-INSTRPrefix--=--prefix-'   

>--+-------------------------------+---------------------------->
   |                 .-,---------. |   
   |                 V           | |   
   '-COPYstgpool--=----pool_name-+-'   

>--+-------------------------------------+---------------------->
   |                       .-,---------. |   
   |                       V           | |   
   '-ACTIVEDatastgpool--=----pool_name-+-'   

                                      .-Wait--=--No------.   
>--+-------------------------------+--+------------------+-----><
   |                 .-,---------. |  '-Wait--=--+-No--+-'   
   |                 V           | |             '-Yes-'     
   '-PRIMstgpool--=----pool_name-+-'                         

Parameters

Source
Specifies the type of database backup series that Tivoli Storage Manager assumes when generating the recovery plan file. This parameter is optional. The default is DBBACKUP. The choices are:
DBBackup
Specifies that Tivoli Storage Manager assumes the latest full database backup series.
DBSnapshot
Specifies that Tivoli Storage Manager assumes the latest database snapshot backup series.
DEVclass
Specifies the device class name that is used to create a recovery plan file object on a target server. The device class must have a device type of SERVER.
Important: The maximum capacity for the device class must be larger than the size of the recovery plan file. If the size of the recovery plan file exceeds the maximum capacity, the command fails.
The naming convention for the archive object that contains the recovery plan file on the target server is:
  • Filespace name:
    • ADSM.SERVER
  • High-level qualifier:
    • AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsdevclassprefix/servername.yyyymmdd.hhmmss
    • Windows operating systemsdevclassprefix\servername.yyyymmdd.hhmmss
  • Low-level qualifier:
    • RPF.OBJ.1
The recovery plan file virtual volume name as recorded in the volume history table on the source server is in the format servername.yyyymmdd.hhmmss.

If the DEVCLASS parameter is not specified, the recovery plan file is written to a file based on the plan prefix.

If SOURCE=DBBACKUP is specified or is defaulted to, the volume history entry for the recovery plan file object specifies a volume type of RPFILE. If SOURCE=DBSNAPSHOT is specified, the volume history entry specifies a volume type of RPFSNAPSHOT.

PLANPrefix
Specifies the path name prefix that is used in the recovery plan file name. This parameter is optional.
  • AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsThe maximum length is 250 characters.
  • Windows operating systemsThe maximum length is 200 characters.
Windows operating systemsSpecifies the path name prefix that is used in the recovery plan file name.

Tivoli Storage Manager appends to the prefix the sortable date and time format yyyymmdd.hhmmss. For example: 20081115.051421.

AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsThe prefix can be one of the following:
Directory path
End the prefix with the forward slash (/). For example:
PLANPREFIX=/adsmsrv/recplans/
The resulting file name would look like this:
/adsmsrv/recplans/20081115.051421
Directory path followed by a string
Tivoli Storage Manager treats the string as part of the file name. For example:
PLANPREFIX=/adsmsrv/recplans/accounting
The resulting file name looks like this:
/adsmsrv/recplans/accounting.20081115.051421
Note the period before the date and time.
String only
Tivoli Storage Manager specifies the directory path. Tivoli Storage Manager uses the name of the current working directory. For example, the current working directory is /opt/tivoli/tsm/server/bin and you specify the following parameter:
PLANPREFIX=shipping
The resulting file name looks like this:
/opt/tivoli/tsm/server/bin/shipping.20081115.051421
Note the period before the date and time.
Windows operating systemsThe prefix can be one of the following:
Directory path
End the prefix with the back slash (\). For example:
PLANPREFIX=c:\adsmsrv\recplans\
The resulting file name looks like this:
c:\adsmsrv\recplans\20081115.051421
Tip: If you issue the PREPARE command from the Tivoli Storage Manager administrative command line client and the last character in the command line is a back slash, it is interpreted as a continuation character. To avoid this, place the prefix value in double quotation marks. For example:
PLANPREFIX="c:\adsmsrv\recplans\"
Directory path followed by a string
Tivoli Storage Manager treats the string as part of the file name. For example:
PLANPREFIX=c:\adsmsrv\recplans\accounting
The resulting file name looks like this:
c:\adsmsrv\recplans\accounting.20081115.051421
Note the period before the date and time.
String only
Tivoli Storage Manager appends the date and time in the .yyyymmdd.hhmmss format (note the period before the date and time) to the prefix. The directory path used by the PREPARE command is the directory representing this “instance” of the Tivoli Storage Manager server. Typically, this directory is the original Tivoli Storage Manager server installation directory. For example, the directory representing this instance of the server is c:\Program Files\Tivoli\TSM;\server2 , and you issue a PREPARE command with the following parameter:
PLANPREFIX=shipping
The resulting recovery plan filename is:
c:\Program Files\Tivoli\TSM;\server2\shipping.20081115.051421
If the PLANPREFIX parameter is not specified, Tivoli Storage Manager selects the prefix in one of these ways:
  • If the SET DRMPLANPREFIX command has been issued, Tivoli Storage Manager uses the prefix specified in that command.
  • Windows operating systemsIf the SET DRMPLANPREFIX command is not defined, Tivoli Storage Manager uses as the path the directory representing this “instance” of the Tivoli Storage Manager server, which is typically the original Tivoli Storage Manager server installation directory. For example, the directory representing this instance of the server is the following:
    c:\Program Files\Tivoli\TSM;\server2
    The resulting recovery plan file name is the following:
    c:\Program Files\Tivoli\TSM;\server2\2008115.051421
  • AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsIf the SET DRMPLANPREFIX command has not been issued, Tivoli Storage Manager uses the directory path name of the current working directory. For example, the current working directory is the following:
    /opt/tivoli/tsm/server/bin
    The resulting file name looks like this:
    /opt/tivoli/txm/server/bin/20081115.051421
INSTRPrefix
Specifies the prefix of the path name used by Tivoli Storage Manager to locate the files that contain the recovery instructions. The maximum length is AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systems250Windows operating systems200 characters.
HP-UX operating systemsImportant: The recovery instructions files must be created on a file system that supports long file names.
AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsThe prefix can be one of the following:
Directory path
End the prefix with the forward slash (/). For example:
INSTRPREFIX=/adsmsrv/recinstr/
/adsmsrv/recinstr/RECOVERY.INSTRUCTIONS.GENERAL
Directory path followed by a string
Tivoli Storage Manager treats the string as part of the file name. For example:
INSTRPREFIX=/adsmsrv/recinstr/accounts
Tivoli Storage Manager appends the appropriate recovery plan file stanza name. For the RECOVERY.INSTRUCTIONS.GENERAL file, the resulting file name is:
/adsmsrv/recinstr/accounts.RECOVERY.INSTRUCTIONS.GENERAL
String only
  • Tivoli Storage Manager specifies the directory path and appends the appropriate recovery plan file stanza name. Tivoli Storage Manager uses the name of the current working directory. For example, the current working directory is /opt/tivoli/tsm/server/bin and you specify the following parameter:
    INSTRPREFIX=shipping
    For the RECOVERY.INSTRUCTIONS.GENERAL file, the resulting file name looks like this:
    /opt/tivoli/tsm/server/bin/shipping.RECOVERY.INSTRUCTIONS.GENERAL 
Windows operating systemsThe prefix can be one of the following:
Directory path
End the prefix with the back slash (\). For example:
INSTRPREFIX=c:\adsmsrv\recinstr\
Tivoli Storage Manager appends the appropriate recovery plan file stanza name. For the RECOVERY.INSTRUCTIONS.GENERAL file, the resulting file name is:
c:\adsmsrv\recinstr\RECOVERY.INSTRUCTIONS.GENERAL
Tip: If you issue the PREPARE command from the Tivoli Storage Manager administrative command line client and the last character in the command line is a back slash, it is interpreted as a continuation character. To avoid this, place the prefix value in double quotation marks. For example:
INSTRPREFIX="c:\adsmserv\recinstr\"
Directory path followed by a string
Tivoli Storage Manager treats the string as part of the file name. For example:
INSTRPREFIX=c:\adsmsrv\recinstr\accounts
Tivoli Storage Manager appends the appropriate recovery plan file stanza name. For the RECOVERY.INSTRUCTIONS.GENERAL file, the resulting file name is:
c:\adsmsrv\recinstr\accounts.RECOVERY.INSTRUCTIONS.GENERAL
String only
Tivoli Storage Manager specifies the directory path and appends the appropriate recovery plan file stanza name. Tivoli Storage Manager appends the recovery plan file stanza name to the prefix. If the prefix is only a string, the directory path used by the PREPARE command is the directory representing this instance of the Tivoli Storage Manager server. This is typically the original Tivoli Storage Manager server installation directory. For example, the directory representing this instance of the server is c:\Program Files\Tivoli\TSM;\server2, and you issue a PREPARE command with the following parameter:
INSTRPREFIX=dock
The resulting recovery plan filename is:
c:\Program Files\Tivoli\TSM;\server2\shipping.20081115.051421
If you do not specify the INSTRPREFIX parameter, Tivoli Storage Manager selects the prefix in one of these ways:
  • If the SET DRMINSTRPREFIX command has been issued, Tivoli Storage Manager uses the prefix specified in that command.
  • Windows operating systemsIf the SET DRMINSTRPREFIX command has not been issued, Tivoli Storage Manager uses as the path the directory representing this “instance” of the Tivoli Storage Manager server, which is typically the original Tivoli Storage Manager server installation directory. For example, the directory representing this instance of the server is the following:
    c:\Program Files\Tivoli\TSM;\server2
    The resulting recovery plan file name is the following:
    c:\Program Files\Tivoli\TSM;\server2\RECOVERY.INSTRUCTIONS.GENERAL
  • AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsIf the SET DRMINSTRPREFIX command has not been issued, Tivoli Storage Manager uses the current working directory.
    For example, if the current working directory is /opt/tivoli/tsm/server/bin, for the RECOVERY.INSTRUCTIONS.GENERAL file, the resulting file name would be:
    /opt/tivoli/tsm/server/bin/RECOVERY.INSTRUCTIONS.GENERAL
PRIMstgpool
Specifies the names of the primary storage pools that you want to restore. Separate the storage pool names with commas and no intervening spaces. You can use wildcard characters. If this parameter is not specified, Tivoli Storage Manager selects the storage pools as follows:
  • If the SET DRMPRIMSTGPOOL command has been issued, Tivoli Storage Manager includes the primary storage pools named in that command.
  • If the SET DRMPRIMSTGPOOL command has not been issued, Tivoli Storage Manager includes all the primary storage pools.
COPYstgpool
Specifies the names of the copy storage pools used to back up the primary storage pools that you want to restore (see the PRIMSTGPOOL parameter). Separate storage pool names with commas and no intervening spaces. You can use wildcard characters. If this parameter is not specified, Tivoli Storage Manager selects the storage pools as follows:
  • If the SET DRMCOPYSTGPOOL command has been issued, Tivoli Storage Manager includes those copy storage pools.
  • If the SET DRMCOPYSTGPOOL command has not been issued, Tivoli Storage Manager includes all copy storage pools.
ACTIVEDatastgpool
Specifies the names of the active-data storage pools that you want to have available for offsite access. Separate active-data storage-pool names with commas and no intervening spaces. You can use wildcard characters. If this parameter is not specified, Tivoli Storage Manager selects the storage pools as follows:
  • If the SET ACTIVEDATASTGPOOL command has been previously issued with valid active-data storage pool names, Tivoli Storage Manager processes those storage pools.
  • If the SET ACTIVEDATASTGPOOL command has not been issued, or all of the active-data storage pools have been removed using the SET ACTIVEDATASTGPOOL command, Tivoli Storage Manager processes only the active-data pool volumes that were marked on-site at the time the PREPARE command is run. Tivoli Storage Manager will mark these volumes as UNAVAILABLE.
Wait
Specifies whether this command is processed in the background or foreground.
No
Specifies background processing. This is the default.
Yes
Specifies foreground processing.

AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsYou cannot specify YES from the server console.

Example: Create a recovery plan file

Issue the PREPARE command and query the activity log to check the results.
prepare
query actlog search=prepare
AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systems
05/03/2008 12:01:13  ANR0984I Process 3 for PREPARE started in the
                      BACKGROUND at 12:01:13. 
05/03/2008 12:01:13  ANR6918W PREPARE: Recovery instructions file
                      /home/guest/drmtest/prepare/tservr/DSM1509/
                      RECOVERY.INSTRUCTIONS.DATABASE not found.
05/03/2008 12:01:13  ANR6918W PREPARE: Recovery instructions file
                      /home/guest/drmtest/prepare/tservr/DSM1509/
                      RECOVERY.INSTRUCTIONS.STGPOOL not found.
05/03/2008 12:01:13  ANR6913W PREPARE: No volumes with backup data
                      exist in copy storage pool CSTORAGEP.
05/03/2008 12:01:13  ANR6913W PREPARE: No volumes with backup data
                      exist in copy storage pool CSTORAGEPSM.
05/03/2008 12:01:14  ANR6920W PREPARE: Generated replacement volume
                      name BACK4X@ is not valid for device type
                      8MM. Original volume name: BACK4X. Stanza is
                      PRIMARY.VOLUMES.REPLACEMENT macro.
05/03/2008 12:01:14  ANR6900I PREPARE: The recovery plan file
                      /home/guest/drmtest/prepare/plandir/DSM1509/
                      r.p.20080503.120113 was created.
05/03/2008 12:01:14  ANR0985I Process 3 for PREPARE running in the 
                      BACKGROUND completed with completion state
                      SUCCESS at 12:01:14.                      
Windows operating systems
05/03/2008 12:01:13  ANR0984I Process 3 for PREPARE started in the
                      BACKGROUND at 12:01:13.
05/03/2008 12:01:13  ANR6918W PREPARE: Recovery instructions file
                      c:\drmtest\prepare\RECOVERY.INSTRUCTIONS.DATABASE
                      not found.
05/03/2008 12:01:13  ANR6918W PREPARE: Recovery instructions file
                      c:\drmtest\prepare\RECOVERY.INSTRUCTIONS.STGPOOL
                      not found.
05/03/2008 12:01:13  ANR6913W PREPARE: No volumes with backup data
                      exist in copy storage pool CSTORAGEP.
05/03/2008 12:01:13  ANR6913W PREPARE: No volumes with backup data
                      exist in copy storage pool CSTORAGEPSM.
05/03/2008 12:01:14  ANR6920W PREPARE: Generated replacement volume
                      name BACK4X@ is not valid for device class 8MM.
                      Original volume name: BACK4X. Stanza is
                      PRIMARY.VOLUMES.REPLACEMENT macro.
05/03/2008 12:01:14  ANR6900I PREPARE: The recovery plan file
                      c:\drmtest\prepare\r.p.20080503.120113
                      was created.
05/03/2008 12:01:14  ANR0985I Process 3 for PREPARE running in the
                      BACKGROUND completed with completion state
                      SUCCESS at 12:01:14.

Related commands

Table 1. Commands related to PREPARE
Command Description
DELETE VOLHISTORY Removes sequential volume history information from the volume history file.
QUERY DRMSTATUS Displays DRM system parameters.
QUERY RPFCONTENT Displays the contents of a recovery plan file.
QUERY RPFILE Displays information about recovery plan files.
QUERY SERVER Displays information about servers.
QUERY VOLHISTORY Displays sequential volume history information that has been collected by the server.
SET DRMACTIVEDATASTGPOOL Specifies that active-data storage pools are managed by DRM.
SET DRMCOPYSTGPOOL Specifies that copy storage pools are managed by DRM.
SET DRMINSTRPREFIX Specifies the prefix portion of the path name for the recovery plan instructions.
SET DRMPLANVPOSTFIX Specifies the replacement volume names in the recovery plan file.
SET DRMPLANPREFIX Specifies the prefix portion of the path name for the recovery plan.
SET DRMPRIMSTGPOOL Specifies that primary storage pools are managed by DRM.
SET DRMRPFEXPIREDAYS Set criteria for recovery plan file expiration.
UPDATE VOLHISTORY Adds or changes location information for a volume in the volume history file.