Restoring files from backups


This topic provides information for restoring a file from a backup.

This topic contains the following information:

Running the restore job

To restore files, perform the following procedure:

  1. Determine which VSAM or sequential file or files to restore.
  2. Build the JCL for the restore job.
  3. Build the RESTORE VSAM_FILE or RESTORE SEQ_FILE command for each file you want to restore.
  4. Run the restore job.
  5. Review results of the restore job.

Using the RESTORE VSAM_FILE command

Restore a VSAM file using the RESTORE VSAM_FILE command, as shown in the following example:

RESTORE VSAM_FILE(GNL.LEDGER
        NEW_NAME(PAY2.GNL)
        AIX(YES)
        BACKUP_IN(CURRENT_BACKUP)
        )
    VSAM_FILE(GNL.PAYROLL)
        AIX(NO)
        BACKUP_IN(CURRENT_BACKUP)
        )
    ;

Using the RESTORE SEQ_FILE command

Restore a sequential file using the RESTORE SEQ_FILE command, as shown in the following example:

RESTORE SEQ_FILE(GNL.LEDGER
        NEW_NAME(PAY2.GNL)
        BACKUP_IN(CURRENT_BACKUP)
        )
    SEQ_FILE(GNL.PAYROLL)
        BACKUP_IN(CURRENT_BACKUP)
        )
    ;

Using the GENERATE_AIXDEF command

Use the GENERATE_AIXDEF command to save the IDCAMS control statements to a partitioned data set (PDS). You can use the command for one or more VSAM groups or one or more VSAM files. For the command's syntax, see GENERATE_AIXDEF command.

Using the VSAM_FILE keyword

Use the required VSAM_FILE keyword on the RESTORE VSAM_FILE command to identify a VSAM file to restore. You can code multiple VSAM_FILE keywords on each command. Set the value to the fully qualified data set name of the VSAM file to restore.

If no BACKUP_IN keyword is specified, the RESTORE VSAM_FILE command will use the value of CURRENT_BACKUP as the default backup source.

You can code the following keywords with the VSAM_FILE keyword to set options for handling this VSAM data set:

  • NEW_NAME
  • AIX
  • BACKUP_IN

Code these keywords and their values after the data set name value but before the closing parenthesis for the VSAM_FILE value.

Using the SEQ_FILE keyword

Use the required SEQ_FILE keyword on the RESTORE SEQ_FILE command to identify a sequential file to restore. You can code multiple SEQ_FILE keywords on each command. Set the value to the fully qualified data set name of the file to restore.

If no BACKUP_IN keyword is specified, the RESTORE SEQ_FILE command will use the value of CURRENT_BACKUP as the default backup source.

You can code the following keywords with the SEQ_FILE keyword to set options for handling this sequential data set:

  • NEW_NAME
  • BACKUP_IN

Code these keywords and their values after the data set name value but before the closing parenthesis for the SEQ_FILE value.

Using the NEW_NAME keyword

Use the optional NEW_NAME keyword to restore a file to a new name. With an alternate data set name, you can copy production files to test and audit production environments. You can perform many recoveries against the file without risking damage to an actual production file.

The NEW_NAME value restores a data set to a different VSAM cluster or sequential file. Only the base cluster is restored for VSAM. You must rebuild alternate paths manually to recreate a complete data set structure.

If you build a NEW_NAME VSAM data set before the restore actions are performed, and that data set has alternate indexes with the data set, you can then use the AIX keyword to have RUV rebuild alternate indexes for that NEW_NAME VSAM data set.

If you do not build the NEW_NAME VSAM data set before the restore actions are performed, but you specify NEW_NAME VSAM data sets as part of the initial restore action, RUV will not rebuild alternate indexes for that NEW_NAME VSAM data set.

Error
Warning

Do not use the NEW_NAME feature with SMS backups that have paths. Use SMS facilities to restore and rename those data sets.

Using the START_TIME keyword

The START_TIME keyword is valid with the RESTORE VSAM_FILE or RESTORE SEQ_FILE command. You can use this keyword with the STOP_TIME keyword to specify the backup data to restore.

Use the optional START_TIME keyword to specify the start (earliest) timestamp of the range of data to include in the restore process. This timestamp is required if you are using a backup that was not produced by RUV. The timestamp could be required for a point-in-time restore, depending on the restore situation.

For more information, see Using-the-START_TIME-keyword.

Using the STOP_TIME keyword

The STOP_TIME keyword is valid with the RESTORE VSAM_FILE or RESTORE SEQ_FILE command. You can use this keyword with the START_TIME keyword to select the range of records to print from the archive.

Use the STOP_TIME keyword to specify the stop (latest) timestamp of the data to include in the restore process. The timestamp could be required for a point-in-time restore, depending on the restore situation.

For more information, see Using-the-STOP_TIME-keyword.

Using the AIX keyword for VSAM files

Use the optional AIX keyword with the VSAM_FILE keyword on the RESTORE VSAM_FILE command to specify whether to rebuild the alternate indexes. Set one of the following values. The default value is YES.

  • YES
    Rebuild alternate indexes.
  • NO
    Suppress the index build process.

Using the BACKUP_IN keyword

Use the optional BACKUP_IN keyword on the RESTORE VSAM_FILE or RESTORE SEQ_FILE command to identify the backup data set to use as input to the restore process.

You can allow RUV to choose the latest active backup based on information in the repository by setting the value of the BACKUP_IN keyword to CURRENT_BACKUP. The CURRENT_BACKUP value causes RUV to look up the most current active backup automatically and perform the delete/define, if needed, against the VSAM file before restoration.

If no keyword is specified, the RESTORE VSAM_FILE or RESTORE SEQ_FILE command uses the value of CURRENT_BACKUP as the default backup source.

When you specify a backup rather than allow RUV to choose the backup based on information in the repository, you are implicitly requesting a point-in-time recovery. The point in time is the GMT timestamp (the start time) of the backup file.

To restore a specific backup file, set the value of the BACKUP_IN keyword to the fully qualified data set name of the backup file (RUV will dynamically allocate the data set).

Warning

Note

If the RESTORE VSAM_FILE or RESTORE SEQ_FILE command includes the BACKUP_IN keyword, the restore report contains details about the backup used in the RESTORE command.

Coding RESTORE VSAM_FILE statements

To code a RESTORE VSAM_FILE statement, use the following syntax:

RESTORE VSAM_FILE(dsn44
        {NEW_NAME(dsn44)}
        {AIX(YES|NO)}
        {BACKUP_IN
           (CURRENT_BACKUP)|(dsn44)}
        )
    { INVENTORY_ONLY(NO|YES) }
    { VSAM_FILE(dsn ... ) }
    ;

Coding RESTORE SEQ_FILE statements

To code a RESTORE SEQ_FILE statement, use the following syntax:

RESTORE SEQ_FILE(dsn44
        {NEW_NAME(dsn44)}
        {BACKUP_IN
           (CURRENT_BACKUP)|(dsn44)}
        )
    { INVENTORY_ONLY(NO|YES) }
    { SEQ_FILE(dsn ... ) }
    ;


 

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

BMC AMI Recovery for VSAM 4.1