DSMSERV RESTORE DB (Restore a database to a point-in-time)

Use this command to restore a database to a point in time. A volume history file and a device configuration file must be available.

Restriction: You cannot restore a server database from a different Tivoli® Storage Manager server when both of the following conditions are true:
  • The database backup is stored on virtual volumes
  • The connection to the Tivoli Storage Manager server is protected by Secure Sockets Layer (SSL)

You can use full and incremental database backups, or snapshot database backups can be used to restore a database to a point in time.

Tip: When you restore a V6 or later Tivoli Storage Manager server database to a specific point in time, the preferred method is to issue the DSMSERV REMOVE DB command before you issue the DSMSERV RESTORE DB command. This ensures that the system is in a clean state. The system drops and uncatalogs the database in the background. When you restore data to a specific point in time, all the required logs and the database image are retrieved from the backup media.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DSMSERV -+----------------------+---------------------------->
            |  (1)                 |   
            '------- -u--user_name-'   

                                 (2).- -k--Server1--.   
>--+-------------------------+------+---------------+----------->
   |  (1)                    |      '- -k--key_name-'   
   '------- -i--instance_dir-'                          

>--+-------------------+--+------------+--+---------+----------->
   '- -o--options_file-'  '- -noexpire-'  '- -quiet-'   

                                .-TOTime--=--23:59:59-.   
>--RESTORE DB--TODate--=--date--+---------------------+--------->
                                '-TOTime--=--time-----'   

   .-Source--=--DBBackup-------.   
>--+---------------------------+-------------------------------->
   '-Source--=--+-DBBackup---+-'   
                '-DBSnapshot-'     

>--+---------------------------+-------------------------------->
   '-RECOVerydir--=--directory-'   

>--+----------------------------------+------------------------->
   '-ACTIVELOGDirectory--=--directory-'   

                                     .-PReview--=--No------.   
>--+------------------------------+--+---------------------+---><
   '-ON--=--target_directory_file-'  '-PReview--=--+-Yes-+-'   
                                                   '-No--'     

Notes:
  1. This parameter applies to only AIX®, HP-UX, Linux, and Solaris servers.
  2. This parameter applies only to Windows servers.

Parameters

AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systems-u user_name
AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsSpecifies a user name to switch to before you initialize the server.
AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systems-i instance_dir
AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systemsSpecifies an instance directory to use. This becomes the current working directory of the server.
Windows operating systems-k key_name
Windows operating systemsSpecifies the name of the Windows registry key from which to retrieve information about the server. The default is SERVER1.
-o options_file
Specifies an options file to use.
-noexpire
Specifies that expiration processing is suppressed when starting.
-quiet
Specifies that messages to the console are suppressed.
TODate (Required)
Specifies the date to which to restore the database. The following values are possible:
MM/DD/YYYY
Specifies that you want to restore a database by using the last backup series that was created before this specified date.
TODAY
Specifies that you want to restore a database by using the most recent backup series that was created before today.
TODAY-numdays or -numdays
Specifies that you want to restore a database by using the most recent backup series that was created the specified number of days before the current date.
TOTime
Specifies the time of day to which to restore the database. This parameter is optional. The default is the end of the day (23:59:59). Possible values are:
HH:MM:SS
Specifies that you want to restore the database by using the last backup series that is created on or before the specified time on the date that is specified on the TODATE parameter.
NOW
Specifies that you want to restore the database by using a backup series that is created on or before the current time on the date that is specified on the TODATE parameter.

For example, if you issue the DSMSERV RESTORE DB utility at 9:00 with TOTIME=NOW, the database is restored by using the last backup series that is created on or before 9:00 on the date that is specified on the TODATE parameter.

NOW-numhours:numminutes or -numhours:numminutes
Specifies that you want to restore the database by using a backup series that is created on or before the current time minus a specified number of hours and, optionally, minutes on the date that is specified on the TODATE parameter.

For example, if you issue the DSMSERV RESTORE DB utility at 9:00 with TOTIME=NOW-3:30 or TOTIME+-3:30, the database is restored by using the last backup series that is created on or before 5:30 on the date that is specified on the TODATE parameter.

Source
Specifies whether the database is restored by using either database full and incremental backup volumes or snapshot database volumes. This parameter is optional. The default value is DBBackup. The following values are possible:
DBBackup
Specifies that the database is restored as follows:
  1. Reads the volume history file to locate the database full and incremental backup volumes that are needed.
  2. Requests mounts and loads the data from the database full and incremental backup volumes as required to restore the database volume to the specified time.
DBSnapshot
Specifies that the database is restored as follows:
  1. Reads the volume history file to locate the snapshot database volumes that are needed,
  2. Requests mounts and loads data from snapshot database volumes as required to restore the volume to the specified time.
RECOVerydir
Specifies a directory in which to store recovery log information from the database backup media. This log information is used to establish transaction consistency of the server database as part of the recovery processing. This directory must have enough space to hold this transaction recovery information and must be an empty directory. If this parameter is not specified, the default is the directory that is specified by one of the following parameters in the DSMSERV FORMAT or DSMSERV LOADFORMAT utility:
  • ARCHFAILOVERLOGDIRECTORY, if specified
  • ARCHLOGDIRECTORY, if ARCHFAILOVERLOGDIRECTORY is not specified
ACTIVELOGDirectory
Specifies a directory in which to store the log files that are used to track the active database operations. Specify this directory only if the intent is to switch to an active log directory that is different from the one that was already configured.
On
Specifies a file that lists the directories to which the database is restored. Specify each directory on a separate line in the file. For example, the ON parameter specifies the restorelist.txt file, which contains the following list:AIX operating systemsHP-UX operating systemsLinux operating systemsSun Solaris operating systems
/tsmdb001
/tsmdb002
/tsmdb003
Windows operating systems
e:\tsm\db001
f:\tsm\db002
g:\tsm\db003
If this parameter is not specified, the original directories that were recorded in the database backup are used.
PReview
Specifies that the volume history files be examined and that the database backup volumes from the volume history file be evaluated.
  1. Which set of database backup volumes best meets the point-in-time criteria that are specified for restore processing? The volume history information provides details about the backup series ID, the operation ID (full, incremental 1, incremental 2, and so on), the date of the database backup, and the device class. This information and the parameters that are specified in the DSMSERV RESTORE DB command determine what to use to perform the restore. The volume history file is examined to find the best database backup that meets the specified point-in-time criteria and then perform the restore by using that backup.
  2. Is self-describing data available for the selected set of database backup volumes? Cross-check the volume history information for this backup series. The reconciliation reports what the self-describing data contains compared to what was learned from the volume history entries. The cross-check involves mounting one or more of the volumes that are indicated by the volume history. Then, using the self-describing data that was included in the database backup volumes, that information is reconciled against what is in the volume history for the database backup. If the information from the volume history file is inconsistent with the self-describing data, then messages are issued to identify the problem. For example, not all values are specified and available, and no self-describing data is found.

If the volume history information is consistent with self-describing data from the database backup, a message is issued indicating that the database backup can be used for restore processing.

If the volume history information is inconsistent with the self-describing data from the database backup or if the self-describing data for the backup cannot be found, error messages are issued indicating what was checked and what was missing.

If the PREVIEW parameter is not specified or if it is set to NO, and if the volume history and self-describing data from the database backup are consistent, then the restore proceeds.

If the PREVIEW parameter is not specified or if it is set to NO, and the reconciliation and validation fail, the database restore is not performed. Make extra volumes available and referred to from the volume history file, or remove the incomplete backup series or operation so that the Tivoli Storage Manager server selects a different preferred series or operation and continues processing.

If the PREVIEW parameter is set to YES, the process performs only the evaluation of the volume history file and the reconciliation and validation against the selected database backup.

Example: Restore the database to a specific point in time

Restore the database to its state on May 12, 2011 at 2:25 PM.
dsmserv restore db todate=05/12/2011 totime=14:45