SEL-RESTORE
Restores one or more selected items from a file saved on tape into a file in your current account.
The item names cannot be changed from those on tape, but they can be forced to overwrite existing items of the same name.
Caution
When migrating data from a Reality system, you must carry out a FILE-SAVE of the migrated database as soon as possible after the migration procedures on the restored database are completed. Similarly, when resizing a database you must carry out a FILE-SAVE as soon as possible after the resized database has been restored. In each case, this allows the modified database to be recovered in the event of a system crash, otherwise migration procedures/resizing will need to be repeated.
Command class
TCL-I command.
Syntax
SEL-RESTORE file-specifier item-list {(options}
Syntax elements
file-specifier identifies the file in the current account into which the restored items are to be placed. Refer to the procedure described below.
item-list is the list of items to be restored. An asterisk (*) indicates that all items in the file (on tape) are to be restored.
item-list can be omitted if an item list is provided by an immediately preceding list generating command.
Options
A Specifies that the tape is already positioned at the required account. For use with subsequent SEL-RESTORE's of the same SAVE tape.
C Specifies that every item up to the next end of file is to be a candidate for restore. This makes it possible to restore even if a D-pointer on tape is damaged. (Valid only if used in conjunction with the N option.)
F Sets the tape speed to 50 ips. Must be specified for tapes with a density of 6250 bpi.
L If Transaction Logging is running, all items restored are logged, regardless of L marker in D-pointers.
N Specifies that the required file is to be identified by its file number (shows position relative to other files). File numbers are shown in the file statistics printout under the heading 'ORDER'.
O Overwrites items already in the file if they have the same item-ids.
P Prints a list of items restored.
S Suppresses the exists
on file
message.
W Specifies that the save is from a case-insensitive database.
Note
You should use this option when loading items saved from a D3 database.
Comments
If the data on the tape is encrypted, your REK file must contain the correct encryption keys to allow your users access. If transferring data from another database, you must load the keys (using the LOAD-REK command) before starting the restore. Refer to Copying Encrypted Data to another Host for more details.
Procedure
- Log on to the account containing the destination file for the saved items.
- Mount the tape at the load point and make sure the unit is on-line.
- Attach the tape unit using ASSIGN or T-ATT.
- If a dummy bootstrap is present (FILE-SAVE or equivalent) enter T-FWD.
- Read and bypass the tape label by entering T-RDLBL.
- If restoring from an M-A-S tape, bypass the account list by entering T-FWD.
-
If a dummy ABS section is present (FILE-SAVE or equivalent) enter T-FWD.
The tape is now positioned at the files section.
- Enter SEL-RESTORE with appropriate parameters and options.
-
Unless the A or N option was specified, the system prompts:
ACCOUNT NAME:
Enter the name of the account on tape under which the file was saved.
-
The system then prompts:
FILE NAME or FILE#?
- To restore a file, enter its filename as it appears on tape or, if the N option was specified, its file number.
- To restore a file dictionary, enter DICT file-name.
- To restore the data section of a file, enter file-name, data-section-name.
- To restore the Master Dictionary of the account, press RETURN only.
The selective restore now proceeds and, when completed, the TCL prompt is returned. If required, it prompts for additional reels to be mounted.
- Finally detach the tape unit, using CLEAR-ASSIGN or T-DET.
Example
The following shows a typical SEL-RESTORE procedure.
:ASSIGN =TAPE 1 [1021] DEVICE(S) TAPE 1 NOW ASSIGNED, RECORD SIZE = 24000 DENSITY = 1600 :T-FWD [94] END OF FILE :T-RDLBL LABEL = FILE SAVE]08:01:33 01 OCT 1993 :T-FWD [94] END OF FILE :SEL-RESTORE DICT TEMP * (O <--- Restore all items into DICT TEMP ACCOUNT NAME? SYSPROG <--- File on tape is called FILE NAME? DICT STAT-FILE <--- DICT STAT-FILE in SYSPROG account SYSTEM 1 BLOCK-CONVERT 2 PROCLIB 5 SYSPROG 7 MD (S)c M/DICT (S) STAT-FILE 11 [992] 33 ITEM(S) HAVE BEEN RESTORED :CLEAR-ASSIGN :