── ARCHIVE ─┬─ RESTORE ────┬─┬─────────────────────┬───────────────────► └─ RESTOREADD ─┘ └─ <archive options> ─┘ ┌◄────────── , ──────────┐ ►─┴─┬─ <directory name> ─┬─┴───────────────────────────────────────────► └─ <file name> ──────┘ ►─ TO ── <archive disk volume> ────────────────────────────────────────► ►─┬───────────────────────────────┬────────────────────────────────────► └─ [ ── <task identifier> ── ] ─┘ ►─┬─────────────────────────────────────┬──────────────────────────────┤ └─ ; ── <archive task equation list> ─┘
Explanation
The ARCHIVE RESTORE statement reloads backup copies of disk files to disk. You can use this statement to recover disk files that have been damaged, lost, or inadvertently removed from disk. Only backup files that were copied through one of the ARCHIVE backup statements, the ARCHIVE MERGE statement, or the ARCHIVE ROLLOUT statement, can be restored to disk through the ARCHIVE RESTORE statement.
Note: | WFL includes another statement called simply RESTORE, rather than ARCHIVE RESTORE. The two statements serve different purposes. The ARCHIVE RESTORE statement reloads files that have archive backup directory entries. The RESTORE statement reloads files from any library maintenance tape, regardless of whether or not the files have archive backup directory entries. |
The ARCHIVE RESTORE statement has the following variants, which function differently:
-
ARCHIVE RESTORE
This statement reloads selected backup copies of files to disk even if versions of those files already exist on the destination disk.
-
ARCHIVE RESTOREADD
This statement reloads only those selected files for which versions do not already reside on the destination disk.
With both the ARCHIVE RESTORE and the ARCHIVE RESTOREADD statements, the archive subsystem selects files by comparing the files you request with records in the archive directory. The restore and restoreadd processes do not affect the archive directory in any way. You can remove a restored file and restore it to disk again, even if an intervening archive backup process has not been performed on that file.
Note: | In most installations, you must have privileged access to reload files other than your own. However, you can reload another user's files if the job running the RESTORE or RESTOREADD process runs without a usercode and starts from an ODT. |
The archive subsystem usually restores only the most recently written archived files from the most recently written archive tapes. Under the following circumstances, however, the archive subsystem restores older versions of files:
-
At installations that use the catalog volume library or the tape volume directory, the archive subsystem checks the status of the most recent backup tape. If the archive subsystem finds that the contents of the most recent backup tape have been purged or overwritten, or if the archive subsystem finds that the most recent backup tape has been marked as destroyed or offsite with a VOLUME DESTROY or VOLUME OFFSITE statement, then the archive subsystem does not select that tape unless there are no better backup tapes or CDs for a given file.
-
If the ARCHIVE backup statement for the most recent backup tape or CD included the attribute OFFSITE or the phrase OFFSITE=TRUE, then the archive subsystem does not select that tape or CD unless there are no better backup tapes or CDs for a given file.
-
If an ARCHIVE VOLUME OFFSITE statement was executed that affected the status of the most recent backup tape or CD, then the archive subsystem does not select that tape or CD unless there are no better backup tapes or CDs for a given file.
-
Your installation uses a custom version of the archive support library and that library selects an older version of a backup tape file for the restore or restoreadd operation.
You can use the HI (Cause Exception Event) system command to check the progress of an ARCHIVE RESTORE statement. A command of the form <mix number> HI displays the number of files already copied and other information.
Examples
The following example illustrates how to manually restore an entire family:
ARCHIVE RESTORE = TO USERPACK
The following example shows how to restore only those files that do not already reside on the disk where the family TESTPACK is located:
ARCHIVE RESTOREADD = TO TESTPACK