Difference between revisions of "RECOVER"
Helengeorge (Talk | contribs) (→Class) |
Helengeorge (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Recover table and index files from a previous backup and a journal file | Recover table and index files from a previous backup and a journal file | ||
Line 29: | Line 27: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Table Basics]] | [[Category:Table Basics]] | ||
[[Category:Table Basics Commands]] | [[Category:Table Basics Commands]] |
Latest revision as of 16:07, 12 November 2009
Purpose
Recover table and index files from a previous backup and a journal file
Syntax
RECOVER FROM <.dbj filename> | (<expC>)
See Also
COPY FILE, ERASE, SET JOURNAL, USE, ZAP
Description
The RECOVER command is used to recover a table and index files after a fatal error such as a disk head crash. The file name can be substituted with an <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then '.dbj' is assumed. A journal of all transactions applied to a table can be kept by issuing the SET JOURNAL command. Whenever changes are made to the table associated with the journal file, then the Recital/4GL will write an 'after image' of the modified table record and other associated information into the journal file. See the SET JOURNAL command for further details.
The journal file should be kept on a separate device to that on which the table and index files reside. At the end of each day, or if the table is constantly changing as in an application such as an order processing system, the table and index files should be 'checkpointed' to suitable backup media. If a fatal error occurs, such as a disk head crash, the following procedure should be carried out. Firstly, restore the table and index files from the last backup, then execute the RECOVER command.
The Recital/4GL will 'apply' all of the transactions in the journal file to the table, and update the indexes. After the RECOVER command has completed, you can continue with normal processing. Note that occasionally a few transactions may have been 'lost' as they may not have been written into the journal file when there was a fatal error. The journal file is a normal Recital table, so you can USE it and see the last transaction to be written, and if need be, apply the missing transactions manually. It is important to reinitialize the journal file after each backup of the table and index files. Use the ZAP command, or delete the file.
Example
use patrons index events, names recover from patrons
Products
Recital Server, Recital