Domdsmc DB2restore
How to use the domdsmc db2restore command is described.
Purpose
- a DB2 Group backup image.
- a set of DB2 Groups from a full DB2 database backup image
- a full DB2 database from a full DB2 database backup image
The pending DB2 file is updated during a successful db2restore restore operation. Note that when performing an alternate database restore, the alternate database can exist as long as /db2replace=yes is specified and the log directory must not be in use by another DB2 database during the first alternate database restore operation.
Syntax
>>-DOMDSMC--DB2RESTore--+-db2group-----+------------------------>
| .-,--------. |
| V | |
'---db2group-+-'
>--+----------------------+------------------------------------->
'-/ADSMNODe=--nodename-'
>--+--------------------------------+--------------------------->
| .-dsm.opt-----. |
'-/ADSMOPTFile=--+-optionsfile-+-'
>--+---------------------+--+-------------------------------+--->
'-/ADSMPWD=--password-' | .-domdsm.cfg--. |
'-/CONFIGfile=--+-cfgfilename-+-'
>--+----------------------------------------------------------------------+-->
| .-domdsm.cfg (DB2ALtdbname=)-. |
'-/DB2ALtdbname=--+----------------------------+----db2database name---'
>--+---------------------------------+-------------------------->
'-/DB2DATAbase=--db2database name-'
>--+-----------------------------------------------------------------------+-->
| .-path relative to alternate database directory-. |
'-/DB2CONTainerpath=--+-path------------------------------------------+-'
>--+----------------------------------------------------------------+-->
| .-domdsm.cfg (DB2LOGPath=)-. |
'-/DB2LOGPath=--+--------------------------+----directory path---'
>--+--------------------------------------------------------------------+-->
| .-domdsm.cfg (DB2LOGTarget=)-. |
'-/DB2LOGTarget=--+----------------------------+----directory path---'
>--+-----------------------+------------------------------------>
| .-Yes-. |
'-/DB2REPlace=--+-No--+-'
>--+--------------------------------------------------------------------------+-->
| .-domdsm.cfg (DB2RESTIntopath=)-. |
'-/DB2RESTIntopath=--+-------------------------------+----directory path---'
>--+--------------------------------+--+-------+---------------->
| .-1-----------. | '-/FULL-'
'-/DB2SESSIONS=--+-numsessions-+-'
>--+----------+--+----------------------------+----------------->
'-/INPlace-' | .-domdsm.log--. |
'-/LOGFile=--+-logfilename-+-'
>--+--------------------+--+------------------------+----------->
| .-60-. | | .-SHOWACtive-. |
'-/LOGPRUne=--+-n--+-' '-/PICk=--+-SHOWALl----+-'
'-No-'
>--+----------------------------+--+----------+--+--------+----->
| .-,00:00:00-. | '-/PREPare-' '-/Quiet-'
'-/PIT=--date--+-,time-----+-'
>--+-----------------------------+-----------------------------><
| .-currentserver-. |
'-/SERVer=--+-servername----+-'
Parameters
- db2group,...
- Specifies the DB2 Group to restore from a table space backup image. Only one DB2 Group can be specified when you are restoring from a table space backup image. When you are restoring a full DB2 database backup image (/full=yes), you can specify multiple DB2 Groups by name or you can specify the wildcard character (*).
- /ADSMNODe=nodename
- Specifies the IBM Storage Protect node name Data Protection for IBM® Domino uses to log on to the IBM Storage Protect server. The command-line value overrides the value in the IBM Storage Protect options file.
- /ADSMOPTFile=optionsfile
- Specifies the IBM Storage Protect options file name. The file name can include a fully qualified path name. If you do not specify a path, the installation directory and then the current directory are searched for the specified file. The default is dsm.opt.
- /ADSMPWD=password
- Specifies the IBM Storage Protect password Data Protection for
HCL Domino uses to logon to the IBM Storage Protect server. If you
specify passwordaccessgenerate in the IBM Storage Protect
options file, then the password is not required. In this case, Data Protection for IBM
Domino uses the password that is stored by the IBM Storage Protect
API.
If passwordaccess is set to generate and you specify a password, the value is ignored unless a password for this node is not stored. In this case, the specified password is stored and used for the current command execution.
If passwordaccess is set to prompt and you specify a password on the command line, you are not prompted for a password. The command-line value overrides the prompt.
If passwordaccess is set to prompt and you do not specify a password on the command line, then you are prompted for a password.
- /CONFIGfile=cfgfilename
- Specifies the name of the Data Protection for HCL Domino preferences file.
The file name can include a fully qualified path. If you do not specify a path, it is assumed the
preferences file in the directory where Data Protection for HCL Domino is
installed.
The default preferences file is domdsm.cfg.
- /DB2ALtdbname=database name
- Specify the name of the alternate DB2 database to use for activation. If the /db2altdbname parameter is not specified, the value of the db2altdbname configuration option (defined in the Data Protection for HCL Domino domdsm.cfg preferences file) is used. If db2altdbname is not defined in the preferences file, the alternate database name DOM_ALT is used.
- /DB2DATAbase=database name
- Specify the name of the DB2 database to restore. The name that is specified overrides the default name (which is the name of the Domino DB2 database that is used by the Domino server). If the /DB2DATAbase parameter is not specified, the current Domino DB2 database name is used.
- /DB2CONTainerpath=path
- Specify container path to be used for a redirected restore operation. A redirected restore
operation is run when you are restoring to an alternate database (inplace=no) or
when you are restoring in place and redefining the table space containers. If
/DB2CONTainerpath is not specified during an alternate restore operation, the
table space containers are defined relative to the alternate database directory.
Attention: /DB2CONTainerpath is required when the DB2DIRECTORY option is specified in the Domino server notes.ini file. Otherwise, the restore fails because DB2 attempts to place the alternate DB2 database data in the directory that is specified by the DB2DIRECTORY option, which is already used by the Domino DB2 database.
- /DB2LOGPath=path
- Specify the base log directory for the alternate database. The directory must exist and must not contain any files before the db2restore command is run. When the /DB2LOGPath parameter is not specified, the configuration option db2altdbname is used. Since the log path cannot be shared by more than one DB2 database, this option must be specified if one alternate database exists.
- /DB2LOGTarget=path
- Specify the target directory for extracting log files from a backup image during an inplace restore. If the /DB2LOGTarget parameter is not specified, the value of the /DB2LOGTarget configuration option (defined in the Data Protection for HCL Domino domdsm.cfg preferences file) is used.
- /DB2REPlace=Yes|No
- Specify whether to replace an alternate database (if it exists). The default value is Yes.
- /DB2RESTIntopath=drive
- Specify the base target DB2 database directory drive letter for the alternate database when you are restoring to an alternate DB2 database. The specified drive must be local. If the /DB2RESTIntopath parameter is not specified, the configuration option /DB2RESTIntopath is used. If the /DB2RESTIntopath configuration option is not specified, the DB2 database default database directory configuration setting is used.
- /DB2SESSIONS=numsessions
- Specify the number of IBM Storage Protect sessions that the DB2 IBM Storage Protect agent uses. You can specify 1 - 64 sessions. The default value is one.
- /FULL=Yes|No
- Specify whether a full DB2 database is restored.
- /INPlace
- Specify an inplace restore. An inplace restore is allowed only when you are restoring a full DB2 database backup image.
- /LOGFile=logfilename
- Specifies the name of the activity log that is generated by Data Protection for IBM
Domino. The log file name is used for the current command and does not update the default
log file that is stored in the preferences file. You can use the set command to
change the default log file name that is stored in the preferences file. The command-line parameter
can be used to override the default for one command run. If the specified file does not exist, it is
created. If it does exist, new log entries are appended to the file. The file name can include a
fully qualified path. If you do not specify a path, the file is written to the directory where
Data Protection for HCL Domino is installed.
The default log file is domdsm.log.
When you are using multiple simultaneous instances of Data Protection for IBM Domino to run operations, use the /logfile parameter to specify a different log file for each instance. Using this parameter directs logging for each instance to a different log file and prevents interspersed log file records. Failure to specify a different log file for each instance can result in unreadable log files.
- /LOGPRUne=60|n|No
- Specifies whether to prune log entries. By default, log pruning is enabled and done daily. You
can use the set command to do one of the following actions:
- Change the defaults so that log pruning is disabled
- Change the number of days log entries are saved
You can specify:- 60
- Specifies that log entries are saved for 60 days before pruning.
- n
- Specifies the number of days to save log entries. The range of values is 0 - 9999. A value of 0 deletes all entries in the log except for the current command run entries.
- No
- Do not prune the log.
Changes to the value of the timeformat or dateformat parameter can result in an undesired pruning of the log file. If you are running a command that prunes the log file and the value of the timeformat or dateformat parameter changes, run one of the following to prevent pruning of the log file:- Make a copy of the existing log file.
- Specify a new log file with the /logfile parameter or logfile setting.
- /PICk=SHOWACtive|SHOWALl
- Displays a list of database backups that match the dbname pattern that can
be selected for restore. The pick list is displayed as a scrollable list from which you can select
the database backups for restore.
You can specify:
- SHOWACtive
- Displays a list of active database backup versions.
- SHOWALl
- Displays a list of both active and inactive database backup versions. All the backup versions that match the dbname pattern are shown.
- /pit=currentdate,currenttime|date,time
- Specifies a point in time when the specified databases are restored. The date and time values
must be specified in the same date and time format that is defined in the Data Protection
for HCL Domino preferences file. The most recent database backup images that are taken
before the specified point in time are restored. Deleted backup images are not restored. Logged
databases can then be rolled forward to that point by specifying the same date and time values on
the /applylogs option of the activatedbs command.
- date
- Specify a date string in the active date format. If you do not specify a date, the specified
databases are restored unless the /pick parameter was used to select inactive
backup versions.
The date must be specified with the same date format that is defined in the Data Protection for HCL Domino preferences file. See Domdsmc set for a list of available date formats.
- time
- Specify a time string in the active time format. If you specify a date without the time,
HH:MM:SS on a 24-hour clock is used.
The time must be specified with the same time format that is defined in the Data Protection for HCL Domino preferences file. See Domdsmc set for a list of available time formats.
Note: If this parameter is used with the /pick parameter, the showactive and showall variables for the /pick parameter are ignored. The pick list contains the database backup images that meet the /pit criteria. - /Quiet
- Specifies that status information does not display. However, the information is written to the activity log.
- /SERVer=currentserver|servername
- Specifies the Domino server name. If not specified, Data Protection for IBM Domino uses the current Domino server.
Examples
Example 1: The following example restores the full backup image of all DB2
Groups (created when originally backed up with the db2selective /full=yes
command) into the existing database (inplace restore):
domdsmc db2restore /full /inplace
Output example:
Starting Domino DB2 database restore... Restoring Domino DB2 Database DOMINO to DOMINO Restore of DOMINO completed successfully.
Example 2: The following example restores a DB2 enabled Notes database from a
full backup image of all DB2 Groups (created when originally backed up with the
db2selective /full=yes command) into an alternate DB2 database:
domdsmc db2restore /full
Output example:
Starting Domino DB2 database restore... Restoring Domino DB2 Database DOMINO to DOM_ALT Restore of DOMINO completed successfully.
- The DB2 Groups in the restored alternate DB2 database are updated with the changes in the DB2 transaction logs by issuing the Domdsmc DB2rollforward command.
- The DB2 enabled Notes databases (in the restored DB2 Groups) must be copied from the alternate restored DB2 database to their final DB2 enabled Notes location by issuing the Domdsmc DB2activatedbs command.
Example 3: The following example restores a DB2 enabled Notes database from a
backup image of DB2 Group GRP1 (created when originally backed
up with the db2selective GRP1 command) into an alternate DB2 database:
domdsmc db2restore GRP1
Output example:
Starting Domino DB2 database restore... Restoring Domino DB2 group GRP1 to DB2 Database DOM_ALT Restore of GRP1 completed successfully.
- The restored DB2 Group is updated with the changes in the DB2 transaction logs by issuing the Domdsmc DB2rollforward command.
- The DB2 enabled Notes databases (in the restored DB2 Group) must be copied from the temporary restored DB2 Group to their final DB2 enabled Notes location by issuing the Domdsmc DB2activatedbs command.