RESTDSN


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

RESTDSN - Logic

Only one data set can be restored per request. Unless specified 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.

RESTDSN - Syntax

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

RESTDSN - Required parameters

Parameter

Description

dsname

A specific data set name, which may be enclosed in apostrophes

The user must have READ authorization for the specified data set.

RESTDSN - Optional Parameters

Option[Short option]

Description

Format

Examples

VOLUME[VOL]

The 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[DATER]

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[ENT]

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[UNIQ]

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

UNIQueid can be taken from a previous LISTDSN command’s output, to be used in RESTDSN.

NEWVOL[NEWV]

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[NEWN]

Restore 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.

dsName

M9.P.JOBS

NEWMCLASS[NEWMC]

Restore 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.

management-class

M9APPLMC

NULLMC

Restore 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.

-

-

NEWSCLASS[NEWSC]

Restore 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.

<storage-class>

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.

NEWSCLASS and NULLSC are mutually exclusive.

-

-

BYPASSACS

Restore 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

-

-

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.

-

-

NOCAT

Allow restore without cataloging

If the parameter is not specified, the default is to catalog the data set upon restore.

-

Important

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

REPLACE

Restore 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

-

-

RESTDSN - Output

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

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

DATA SET <dsname> 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.

RESTDSN - Examples

The following examples demonstrate various ways to use the command.

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

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

Restoring the latest copy of a data set with replace

TSO M9CLI RESTDSN M9.USER.SOURCE REPLACE

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

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

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

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

Restoring a non-cataloged data set within a date range using ENTRY or UNIQUEID

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

assets_-Ma4P1R_Ef3vTtIth_YE_-MdODsuT_DLXwwkYYzVM_-MdOHHavFUU5wAGwT94x_image_png.png

The restore can be executed using the same search criteria specified on the LIST command, where the specific copy is selected 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*