RESTDSN


The RESTDSN command restores a data set backup copy, either from an incremental backup or from a volume full dump.

Logic

You can restore only one data set per request. Unless you specify otherwise, the RESTDSN does not replace the source data set, and does catalog the restored target copy. By default, the most current backup copy is restored.

Syntax

M9CLI RESTDSN <dataSetName> [VOLume(<volumePattern>)]
 [DATE(yyyy/mm/dd)|DATERange(yyyy/mm/dd-yyyy/mm/dd)]
 [ENTry(<integer>)|UNIQueid(<uniqueId>)]
 [NEWVol(<volume>)]
 [NEWName(<dataSetName>)]
 [NEWMClass(<managementClass>)|NULLMC]
 [NEWSClass(<storageClass>)|NULLSC]
 [BYPASSACS]
 [NODUMP]
 [NOCATalog]
 [REPLace]

Required parameters

Parameter

Description

dataSetName

A specific data set name, which you can enclose in apostrophes

You must have READ authorization for the specified data set.

Optional parameters

Option (short option)

Description

Format

Examples

VOLume

Volume on which the data set resides

Full name or using a pattern

SYSRES

PROD*

SYS%RS

DATE

Requests a backup copy that was created on a specific date only

DATE and DATERange are mutually exclusive.

yyyy/mm/dd

2019/08/15

DATERange

Requests a backup copy that was created within a specific date range

DATERange and DATE are mutually exclusive.

yyyy/mm/dd-yyyy/mm/dd

2019/01/01-2019/08/15

ENTry

A positive sequential number from 0, 1, 2, and so on, representing the available entries of a backup copy, according to the specified criteria

integer

0—The latest copy (default)

1—The copy prior to the latest, and so on.

UNIQueid

An 8-byte ID that when combined with the data set name identifies each backup copy

Use UNIQueid to refer to a specific copy of a data set without having to specify any additional filters. UNIQueid and ENTry are mutually exclusive.

8 characters

You can take the UNIQueid from a previous LISTDSN command’s output and use it in RESTDSN.

NEWVol

The command will attempt to restore the data set to the specified volume

For SMS-managed data sets, the decision whether to honor the request is done by ACS routines. For non-SMS managed data sets, the decision whether to honor the request is made by the operating system according to the availability of the volume.

volume

PROD01

NEWName

Restores the data set with a new name

The user must have ALTER authorization for the new data set name. The new name may be enclosed in apostrophes.

dataSetName

M9.P.JOBS

NEWMClass

Restores the data set with the specified management class as input to the ACS routines instead of the management class the data set originally had when it was archived

NEWMClass and NULLMC are mutually exclusive.

managementClass

M9APPLMC

NULLMC

Restores the data set with null management class as input to the ACS routines instead of the management class the data set originally had when it was archived

NEWMClass and NULLMC are mutually exclusive.

NA

NA

NEWSClass

Restores the data set with the specified storage class as input to the ACS routines instead of the storage class the data set originally had when it was backed up.

NEWSClass and NULLSC are mutually exclusive.

storageClass

M9APPLSC

NULLSC

Restore the data set with null storage class as input to the ACS routines instead of the storage class the data set originally had when it was backed up

NEWSClassand NULLSC are mutually exclusive.

NA

NA

BYPASSACS

Restores the data set with bypassing the ACS routines option

The user must have READ access to the BMC AMI Cloud resource M9.CLI.RESTDSN.BYPASSACS

NA

NA

NODUMP

Requesting that RESTDSN select backup copies only, without considering data set copies found in a volume full dump.

The default is to allow selection of backups from a volume full dump.

NA

NA

NOCAT

Allows restore without cataloging

Important

The default is to catalog the data set upon restore, whether it was cataloged or not when backed up.

NA

NA

REPLACE

Restores the backup copy onto the target data set and replace it

If the parameter is not specified, the default is not to replace the current data set

NA

NA

Output

The output displays the given RESTDSN command and parameters, followed by the requested information:

DATA SET <dataSetName> WAS RESTORED FROM A BACKUP COPY MADE ON <yyyy/mm/dd> at <hh:mm:ss>

DATA SET <dataSetName> WAS RESTORED FROM A FULL VOLUME DUMP MADE ON <yyyy/mm/dd> at <hh:mm:ss>

If the request fails, the complete log will be displayed. If the requesting user is not available, the first 100 records of the output will be printed in the executing agent's log.

Examples

The following examples demonstrate various ways to use the command.

Restoring the latest copy of a data set with a new name

Example:
TSO M9CLI RESTDSN M9.USER.SOURCE NEWNAME(M9.USER.SOURCE.PREVIOUS)

Restoring the latest copy of a data set with replace

Example:
TSO M9CLI RESTDSN M9.USER.SOURCE REPLACE

Restoring the latest copy of a data set, requesting to use only incremental backup as the input

Example:
TSO M9CLI RESTDSN M9.USER.SOURCE NEWNAME(M9.USER.SOURCE.PREVIOUS) NODUMP

Restoring the latest copy of a data set with the same name, on a new volume, without cataloging

Example:
TSO M9CLI RESTDSN M9.USER.SOURCE NEWVOL(M9USER) NOCAT

Restoring the latest copy of a data set with specific management class and storage class as input to the ACS routines

Example:
TSO M9CLI RESTDSN M9.USER.SOURCE NEWMC(M9PRODMC) NEWSC(M9PRODSC)

Restoring a non-cataloged data set within a date range using ENTry or UNIQueid

Example:

When restoring a data set other than the latest, LISTDSN the volume first for the available copies:

M9CLI LISTDSN SYSlPARMLIB VOL(M9RES1) DATERANGE(2019/06/01-2019/06/30)

LISTDSNSYSl.PARMLIB VOL(M9RESl) DATERANGE(2019/06/01-2019/06/30)
Mode19 CLI SYSNAMES0W1 DATE: 2019/07/24VERSION: 1.7.0

ListingData Set: SYSl.PARMLIB

  ENTRYDATE   TIME    VOLUME TYPE    C W EXPIRATION UNIQUEID
  ----- ---------- -------- ------ ------- - - ---------- --------
      02019/06/30 19:23:15M9RES1 Backup  - N NONE   9A09F2C3
      12019/06/28 09:19:07M9RES1 Backup  - N NONE      29A78281
      22019/06/26 08:47:06M9RES1 Backup  - N NONE      F9E717CE
      32019/06/20 01:52:09M9RES1 Backup  - N NONE      7EDBC632

You can run the restore by using the same search criteria specified on the LIST command, where the specific copy is selected by using ENTry:

M9CLI RESTDSN SYS1.PARMLIB VOL(M9RES1) DATER(2019/06/30-2019/06/01) ENTRY(2) NOCAT

There is no need to specify any additional search criteria when using the UNIQueid parameter:

M9CLI RESTDSN SYS1.PARMLIB VOL(M9RES1) UNIQUEID(F9E717CE) NOCAT

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*