HELP RECOVER — VMS 5.0
RECOVER[/RMS_FILE] {/FORWARD|/BACKWARD} recovery-filespec
Invokes the RMS Recovery Utility. Applicable only if you have the
RMS Journaling option. See the VAX RMS Journaling Manual.
The RMS Recovery Utility (RECOVER/RMS_FILE) is used to restore RMS
files after the files have become lost or the data in them has
become unuseable. You can use RECOVER/RMS_FILE to redo operations
(with after-image journaling, using a previously-made backup file),
or to undo operations (with before-image journaling, using the
actual data file). When you use the RMS Recovery Utility to redo
operations by rolling an RMS file forward from a backup copy of the
object file, it is called after-image recovery. When you use the
RMS Recovery Utility to undo operations by rolling the object file
back to a previous state, it is called before-image recovery.
You invoke the RMS Recovery Utility by typing the command
RECOVER/RMS_FILE and the appropriate qualifiers.
Additional information available:
/BACKWARD/BI_BUFFER_SIZE/CACHE_SIZE/FORWARD
/JOURNAL/LOG/UNTIL
Parameters
The only parameter is the file specification to which recovery is applied. For recovery using after-image journaling, use the backup copy of the data file as the file specification. For recovery using before-image journaling, use the original data file as the file specification.
/BACKWARD
The /BACKWARD qualifier instructs the RMS Recovery Utility to roll a file backward to a previous state. Use the /BACKWARD qualifier to recover a file using a journal file that has before-image journal entries for the data file that you specify. To specify a date and time to which the file is to be rolled backward, use the /UNTIL= qualifier. You should always use this qualifier for before-image recovery; if you do not use the /UNTIL= qualifier when you specify /BACKWARD, the file will automatically be rolled back to the time when the first entry was made in your before-image journal.
Additional information available:
Examples
$ RECOVER/RMS_FILE/BACK/LOG/UNTIL=30-JUN-1988 WEEKLY.DAT %RMSREC-I-FILBACKWARD, $DISK1:[PAYROLL]WEEKLY.DAT;17 rolled backward %RMSREC-I-DATETIME, date/time of last record processed: 30-JUN-1988 07:41:23.27 %RMSREC-I-NUMRECS, 936 records processed This command rolls the file WEEKLY.DAT backwards until 30 June 1988 (default time of day of 00:00). The /LOG qualifier instructs the RMS Recovery Utility to display display the number of records processed processed (that is to say, un-done) and the date and time that the last record was written. After executing this command, the file WEEKLY.DAT is the same as it was at midnight, 30 June 1988.
/BI_BUFFER_SIZE
The /BI_BUFFER_SIZE= qualifier lets you specify the number of blocks that RMS recovery reads for each I/O from the journal file. It is similar in concept to the multiblock count field (RAB$B_MBC) in RMS. Use the /BI_BUFFER_SIZE qualifier to tune your application and improve performance during recovery. For more information on how to tune your application using this value, see the Designing Files/Units of Input/Output section in the Guide to VAX/VMS File Applications) and the VAX RMS Reference Manual. You can use the /BI_BUFFER_SIZE qualifier only when you specify the /BACKWARD qualifier.
Additional information available:
Examples
$ DIRECTORY/SIZE ACCOUNTS_PAYABLE.RMS$JOURNAL ACCOUNTS_PAYABLE.RMS$JOURNAL;1 108 $ RECOVER/RMS_FILE /BACKWARD /BI_BUFFER_SIZE=108 ACCOUNTS_PAYABLE.DAT This example shows that the journal file ACCOUNTS_PAYABLE.RMS$JOURNAL has a size of 108 blocks. The RECOVER/RMS_FILE /BI_BUFFER=108 command sets the buffer to be 108 blocks.
/CACHE_SIZE
The cache size is the number of indexed buckets that are retained in in-memory cache during a recovery operation. Use the /CACHE_SIZE= qualifier to set the size of a cache in order to improve performance when recovering indexed files. In general, the performance of the recovery operation improves as the cache size grows larger. However, other system considerations could affect the ideal size. The /CACHE_SIZE= qualifier is similar in concept to the multibuffer count field (RAB$B_MBF) in RMS. For more information on how to tune your application using this value, see the Guide to VAX/VMS File Applications and the VAX RMS Reference Manual. The /CACHE_SIZE= qualifier applies only to indexed files. You can use this qualifier with either /BACKWARD or /FORWARD recoveries.
/FORWARD
The /FORWARD qualifier instructs the RMS Recovery Utility to roll a file forward from a previous state. Use the /FORWARD qualifier to recover a backup file by using the after-image journaling information contained in a journal file. Both the journal file and a backup copy of the data file must be available in order to recover a file using the /FORWARD qualifier.
Additional information available:
Examples
$ RECOVER/RMS_FILE/FORWARD/LOG BACKUP.DAT %RMSREC-I-FILFORWARD, $DISK1:[PAYROLL]BACKUP.DAT;17 rolled forward %RMSREC-I-DATETIME, date/time of last record processed: 4-AUG-1988 11:28:29.74 %RMSREC-I-NUMRECS, 3490 records processed This command rolls the file forward, beginning at the point when the last backup was made (using the BACKUP/RECORD command) and continuing through the last record that was written to the journal file. At this point, the recovered file has the same data as the data file (on 4 August at 11:28), with the file characteristics of the backup file. $ RECOVER/RMS_FILE/FORWARD/UNTIL=30-JUN-1988/LOG WEEKLY_BACKUP.DAT %RMSREC-I-FILFORWARD, $DISK1:[PAYROLL]WEEKLY_BACKUP.DAT;17 rolled forward %RMSREC-I-DATETIME, date/time of last record processed: 29-JUN-1988 15:23:44.30 %RMSREC-I-NUMRECS, 2554 records processed This command rolls the file WEEKLY_BACKUP.DAT forward, beginning at the time that the file was created by the Backup Utility. It is rolled forward until 30 June 1988, using the default time of day 00:00. (In this case, the last record written before that time was on 29 June at 15:23.) Use of the /LOG qualifier provides information about the number of records processed and the date and time of the last record that was restored. After this operation, the file WEEKLY_BACKUP.DAT is the same as the data file for which it was the backup copy (presumably, WEEKLY.DAT) at midnight on 30 June 1988.
/JOURNAL
The /JOURNAL= qualifier specifies the name of the journal file that is to be used for recovery operations. During the recovery operation, the entries in this journal file will be applied to the backup file (for after-image recovery) or to the data file (for before-image recovery). By default, the RMS Recovery Utility uses the journal file that was specified when the data file was marked for journaling (with SET FILE/AI_JOURNAL or /BI_JOURNAL). You might use the /JOURNAL qualifier if the journal file were in a different location from that originally specified in the SET FILE command (for example, if the original journal file becomes unuseable and a backup copy of the journal file is on another device). You might also use the /JOURNAL qualifier if the journaling information were in two or more different journals.
Additional information available:
Examples
$ RECOVER /FORWARD /JOURNAL=ARCHIVE_DISK:INVENTORY_1 INVENTORY.BCK $ RECOVER /FORWARD /JOURNAL=ARCHIVE_DISK:INVENTORY_2 INVENTORY.BCK $ RECOVER /FORWARD INVENTORY.BCK In this example, three after-image journal files are applied to the file INVENTORY.BCK, which would be a backup copy of a data file. In the third of the RECOVER commands, where the /JOURNAL qualifier is not used, the default journal file (the one specified by the most recent SET FILE/AI_JOURNAL command for the data file) is used. (Note that this series of commands would not be necessary if a backup copy of the data file were made and is still available when the most recent SET FILE command was issued.)
/LOG
Use the /LOG qualifier to generate a report of the recovery operation. When you use the /LOG qualifier, the RMS Recovery Utility displays the number of records that were processed during the recovery operation, and the date and time of the last record that was processed (recovered).
/UNTIL
The /UNTIL= qualifier specifies the date and time at which to end an after-image or before-image recovery. Specify the date and time using either absolute time or delta time. See the DCL Concepts Manual for more information about specifying absolute and delta time. For after-image recovery, the /UNTIL qualifier specifies the date and time up to which the backup copy of the data file is to be restored. If you do not use the /UNTIL qualifier with after-image recovery, then all updates through the most recent update recorded in the after-image journal file are restored. For before-image recovery, the /UNTIL qualifier specifies the date and time back to which the data file is rolled. That is, all modifications to the data file from the present time to the time specified with the /UNTIL qualifier are removed. In most cases, you should use the /UNTIL qualifier with before-image recovery; if you do not, then all modifications recorded in the before-image journal file will be removed.
Additional information available:
Examples
$ RECOVER /BACKWARD /UNTIL=19-JUL-1988:12:00 SALES.DAT This command rolls the file SALES.DAT backward, beginning with the most recent update and continuing in reverse chronological order until 12:00 noon on July 19, 1988. The Recovery Utility automatically uses the before-image journal file that was specified (or implied) with the most recent SET FILE/BI_JOURNAL command for the file SALES.DAT.