TL-RESTORE
Restores all updates, or a selected list of updates, onto a database from a specified clean log.
Note
TL-RESTORE should normally only be used to selectively restore from a clean log. To restore a complete clean log, using tlmenu is recommended.
Command Class
Cataloged DATA/BASIC program.
Syntax
TL-RESTORE first_clog {(options)}
Syntax Elements
first_clog The name of the first clean log to be restored.
Options
A Causes the restore process to sequence through clean logs in chronological order until no more logs exist. All clean logs in the chain must be present on the database.
AE Causes the restore process to sequence though all existing logs in chronological order, then wait at the EOF mark of the last log until the next log is available. If a log is missing or invalid it is prompted for.
Note
The A and AE options require clean logs to be chained together during logging run time.
C Displays a count of sets of 500 updates applied to the database and information about the images applied.
Hn} Specifies the maximum number of images recorded in the history file (normally
L Prompts you for alternative file names for the error log and history file, as follows:
ERROR LOG:
HISTORY FILE:
If you enter a name, the file is created if it does not already exist. Rejected images and history information for the restore are then entered into the named files.
At each prompt, if you press return,
R Prevents the error log (
If this option is not specified,
S Generates an asterisk for each update restored.
Restrictions
Use is restricted to SYSMAN.
Log Files
When
TL-REJECT Logs After images that fail to be
restored on the database by
TL-LIST Contains history information about the last 2000 images successfully restored and the last 20 images successfully restored per port (see below).
Subsequently
History File
TL-LIST contains two items for each log restored, log
and log.PORTS, each containing a list of images which have been
successfully applied to the database during a
-
CLOG1 lists the item-ids of the last 2000 images successfully applied to the database. The number of image logged can be set using the H option.
Note
The number of images logged can be changed using the H option.
- CLOG1.PORTS which lists item-ids for the last 20 images successfully applied to the database from each port on the database. Lists for each port are concatenated in the same item.
The name of the history file can be changed with the L option
You can use the ENGLISH command NEW-GET-LIST to retrieve a list of
items from
Chaining Clean Logs
Switching logs creates a pointer from
the current clean log to the new clean log to which logging is switched. Hence
this creates a chain of clean logs which can be restored by
Log CLOG2 empty. Please load new log file.
Hit A to Abort or C to continue.
The chain of clean logs will be interrupted by stopping and starting logging, in which case the restore will terminate at the clean log active when logging was stopped.
Selective Recovery
To carry out a selective recovery you must
first execute the SELECT command
to compile a select list of the After images and transaction boundary
images to be recovered from the clean log, then execute
SELECT clean-log-file WITH ACCOUNT account-name AND WITH FILENAME = filename
Log file information can be retrieved under 16 attribute names. They are:
ACCOUNT The Reality account id being used when the image was logged.
CLOGSEQ The sequence number of the image in the clean log.
DATE The date when the image was first logged, stored in internal format.
FILENAME The Reality file for which the image was logged.
INFO Information field from TRANSTART/TRANSEND/TRANSABORT image.
ITEM The item id of the associated item, except transaction boundaries.
ITEMINFO Combines the ITEM and INFO attribute definitions.
OPERATION The type of operation for which the image was logged.
PORT The number of the port being used when the image was logged.
RESULT This is a failure code which will appear in an error log image. It indicates the reason for the failure to restore the update. Clean log items where recovery has not been attempted or where recovery has been successful contain 0.
You can use the perror host command to interpret the code and find out the reason for the failure.
RLOGSEQ The transaction id which is the sequence number of the transaction COMMIT image. All images in the committed transaction have the same RLOGSEQ id as the COMMIT image. Independent updates each have different ids.
SERVICE The Reality service which generated the image. This may be either Reality File Services (RFS) which generates update images or Reality Transaction Services (RXS) which generates transaction boundary images.
TIME The time when the image was first logged, stored in internal format.
TYPE The type of log image. This may be one of Start, Switch, After or Commit. The Commit image is logged at 'Transaction end'.
USER The Reality user-id being used when the image was logged.
Caution
You must not sort items in a clean log as this will cause incorrect
sequencing of images during a