DSMSERV RESTORE DB (Restore a database to its most current state)

Use the DSMSERV RESTORE DB utility to restore a database to its most current state under certain conditions.

The following conditions must be met:
  • An intact volume history file is available.
  • The recovery logs are available.
  • A device configuration file with the applicable device information is available.
Restriction: You cannot restore a server database if the release level of the server database backup is different from the release level of the server that is being restored. For example, an error occurs when you restore a Version 7.1.3 database and you are using a Version 8.1 IBM Spectrum Protect server.

IBM Spectrum Protect requests volume mounts to load the most recent backup series and then uses the recovery logs to update the database to its most current state.

Snapshot database backups cannot be used to restore a database to its most current state.
Tip: When you restore a V7 or later IBM Spectrum Protect server database to its most current state, the preferred method is to issue the DSMSERV REMOVEDB 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 its most current state, all the required logs and the database image are retrieved from the backup media.

Syntax

Read syntax diagramSkip visual syntax diagram DSMSERV 1-uuser_name1-iinstance_dir-kServer12-kkey_name-ooptions_file1 -quiet RESTORE DB RECOVerydir=directoryACTIVELOGDir=directoryON=target_directory_filePReview=NoPReview=YesNoRESTOREKeys=NoRESTOREKeys=NoYESONLYPASSword=password_namePROMPT=YesPROMPT=YesNo
Notes:
  • 1 This parameter applies to AIX® and Linux® servers only.
  • 2 This parameter applies only to Windows servers.

Parameters

Linux operating systemsAIX operating systems-u user_name
Linux operating systemsAIX operating systemsSpecifies a user name to switch to before initializing the server.
Linux operating systemsAIX operating systems-i instance_dir
Linux operating systemsAIX operating systemsSpecifies an instance directory to use. This instance directory 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.
Linux operating systemsAIX operating systems-quiet
Linux operating systemsAIX operating systemsSpecifies that messages to the console are suppressed.
RECOVerydir
Specifies a directory in which to store recovery log information from the database backup media. 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 to the directory specified by one of the following parameters in the DSMSERV FORMAT or DSMSERV LOADFORMAT utility:
  • ARCHFAILOVERLOGDIRECTORY, if specified
  • ARCHLOGDIRECTORY, if ARCHFAILOVERLOGDIRECTORY is not specified
ACTIVELOGDir
Specifies a directory in which to store the log files that are used to track the active database operations. This directory must be specified only if the intent is to switch to an active log directory different from the one that had already been 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:Linux operating systemsAIX 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.
Tip: If you specify multiple directories, ensure that the underlying file systems are of equal size to ensure a consistent degree of parallelism for database operations. If one or more directories for the database are smaller than the others, they reduce the potential for optimized parallel prefetching and distribution of the database.
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 most current 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 most recent database backup and then to restore the data 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 IBM Spectrum Protect 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.

Linux operating systemsWindows operating systemsAIX operating systemsRESTOREKeys
Linux operating systemsWindows operating systemsAIX operating systemsSpecifies whether to restore the server master encryption key that is used to encrypt storage pool data when the database is restored. This parameter is optional and only applies if you are using encrypted container storage pools in a cloud environment. If the server master key is protected when the database is restored, the default is YES. If the server master key is not protected when the database is restored, the default is NO. You can specify one of the following values:
No
Specifies that the server master key is not restored when the database is restored.
Yes
Specifies that the server master key is restored when the database is restored. You must specify a password with this parameter.
Only
Specifies that only the server master key is restored. The database is not restored.
Linux operating systemsWindows operating systemsAIX operating systemsPASSword
Linux operating systemsWindows operating systemsAIX operating systemsSpecifies the password that is used to protect the database backup.
Attention: If you choose to use this parameter to specify a password, the password is displayed on the command line and is not secure. If you specify a value for the PASSWORD parameter, you must also specify PROMPT=NO; otherwise, the command fails. To help protect the password, use the PROMPT=YES parameter value instead of the PASSWORD parameter to ensure that users are prompted for the password. When using the PROMPT=YES parameter value, the password is not displayed on the command line.
Linux operating systemsWindows operating systemsAIX operating systemsIf you specify a password for database backup, you must specify the same password on the RESTORE DB command to restore the database. You must use a password using either the PROMPT=YES parameter value or the PASSWORD parameter if you specify any of the following parameter values:
  • On the DSMSERV RESTORE DB command, RESTOREKEYS=YES
  • On the DSMSERV RESTORE DB command, RESTOREKEYS=ONLY
  • On the SET DBRECOVERY command, PROTECTKEYS=YES
PROMPT
Specifies whether to prompt the user for the password that is used to protect the database backup. This password to protect the master encryption key was set by using the SET DBRECOVERY or the BACKUP DB command.
Yes
Specifies that the server prompts the user for the password that is used to protect the database backup. This setting helps to protect the password. This is the default when a password is required.
No
Specifies that the server does not prompt the user for the password. Instead, the server uses the password that is specified by using the PASSWORD parameter. If you use the PASSWORD parameter along with the PROMPT=NO parameter value, the password is displayed on the command line, and unauthorized users might access the password. If you choose to specify the PASSWORD parameter, you must also specify the PROMPT=NO parameter value.

Example: Restore the database to its most current state

Restore the database to its most current state by using the already configured active log directory.
 dsmserv restore db

Example: Restore the server master key without restoring the database

Restore the server master key without restoring the database by issuing the following command:
dsmserv restore db restorekeys=only