Overview of Save and Restore
The data on a Reality database can be saved in two ways: a logical save that extracts the files and accounts to be saved from the database, and a physical save that saves the data exactly as it is on the disk. In both cases, there are several TCL and host commands available, providing a range of save and restore options.
Logical saves
Logical saves have the following advantages:
- A logical save is machine architecture independent and can be restored on a host with different byte ordering.
- The logical save utilities generate file statistics and perform a consistency check.
- Logical saves may be used as part of a procedure to optimise file layout in the database. See Improving Database Efficiency.
- Utilities are available to selectively restore accounts, files and items.
However, because a logical save has to extract the files and accounts to be saved from the database, it can take a long time, particularly for a large database.

Reality provides the following logical save commands:
FILE-SAVESaves a complete database to tape. Can be used while users are logged on.
F-SThis
is similar to
ACCOUNT-SAVESaves one or more accounts to tape. Can be used for the following:
-
To copy accounts between databases.
-
To back up part of a database; for example, to save heavily used accounts as an extra backup between complete saves.
-
To save infrequently used accounts which can then be excluded from subsequent saves.
M-A-SSaves one or more accounts to tape.
Similar to
T-DUMP and
ST-DUMP
Save selected file items to tape.
dbsaveThis utility performs
Reality database file-saves and restores with greater speed than can be achieved
with
Notes
- Only single reel saves can be restored on Release 7.x systems.
- Old save commands are available to save in a format that is compatible with older versions of Reality (Releases 5.3 and 6.0).
- You can verify a
FILE-SAVE ,ACCOUNT-SAVE orM-A-S tape with theVERIFY-SAVE command. - The SAVE command also dumps one or more file sections and accounts to tape.
The
ACCOUNT-SAVE ,FILE-SAVE ,F-S andM-A-S Procs all use this and should be used in preference to it.

Reality provides the following TCL commands to restore logical saves:
ACCOUNT-RESTORE
Can restore a complete database or individual accounts.
- To restore a complete database, use
ACCOUNT-RESTORE * (O
. Use withFILE-SAVE orF-S tapes.- To restore one or more accounts, use
ACCOUNT-RESTORE (O
. Use withFILE-SAVE ,F-S orACCOUNT-SAVE tapes.
SEL-RESTORESelectively restores files and items. Use with
M-A-RUsed to restore one or more accounts
from an
T-LOADSelectively restores file items from a
dbsaveSee Logical
Save Commands
Notes
- The topic Restore Procedures describes in greater detail the circumstances under which you should use these commands.
- After restoring a database saved from an earlier version of Reality, you must run SYS-UPDATE.
- After restoring an account saved from an earlier version of Reality, you must run UPDATE-ACCOUNT.
- If you are importing data from a pre-7.0 version of Reality, you should use the migration utilities described in the User's Guide to the Reality Migration Utilities.
- Do not restore from a save that reported Group Format Errors (GFEs), as this will result in data loss.
Physical saves
Physical saves are very much faster than logical saves - especially when performed to multiple tape decks simultaneously. However, they do have the following restrictions:
- Physical saves cannot be used on filestore databases (UNIX).
- A physical save cannot be restored on a host with different byte ordering; for example, a realdump save of a Windows (Intel) database can be restored on a Linux (Intel) system, but not on a Solaris (Sparc) system. For long term archives it is recommended that a logical save format (using FILE-SAVE, for example) is used, because this is machine architecture independent.
- If the free-space table is being used for checkpointing and you run out of space, database updates will freeze until space becomes available (as each item of checkpoint data is saved, the associated checkpoint space is released). You can avoid this problem by using a host file or disk partition to hold the checkpoint data.
- Reality files on foreign databases cannot be saved.
- The physical save utilities do not generate file statistics nor perform a consistency check. If required, this can be done using the ALL-FILE-STATS command.
- The physical save utilities cannot be used to optimise file layout.
When performing a physical save to tape image it is strongly recommended that you compress the image. For physical saves, compression level 2 gives the best compromise between performance and file size.

Reality provides the following logical save commands:
SAVE-IMAGESaves a
complete database to tape. Creates a physical backup of a complete database and can be several times faster
than
realdumpThis is the host equivalent of
Notes:
- You can verify a
SAVE-IMAGE or realdump tape with theVERIFY-IMAGE command. - The IMG.SAVE command also creates a
physical save of a complete database. The
SAVE-IMAGE Proc uses this and should be used in preference to it.

LOAD-IMAGEThis restores a database that was saved using
realloadThis host command allows you to restore a physical backup created using the realdump host command or the SAVE-IMAGE TCL command.
Notes
- The topic Restore Procedures describes in greater detail the circumstances under which you should use these commands.
- After restoring a database saved from an earlier version of Reality, you must run SYS-UPDATE.
- The IMG.LOAD command also restores a physical save of a complete database. The LOAD-IMAGE Proc uses this and should be used in preference to it.
Checkpointing
Physical saves use checkpointing so that Reality users can continue to work while the backup is carried out. When the backup starts, the database is momentarily frozen to ensure it is consistent and to allow a "snapshot" to be taken of the state of the database. Then, as the save proceeds, each time a block in the database is changed, the original data is copied to the checkpointing area. The data that is backed up is a mixture of unchanged data from the database and checkpoint data. The backup therefore accurately reflects the state of the database at the time the backup started.
By default, the checkpoint data is saved in the database's free space table. This requires no additional hardware, but has the disadvantage that if the database runs out of free space, user updates will be suspended until the checkpoint data has been saved . As each item of checkpoint data is saved, the free space is released.
As an alternative to using the free space table, you can specify a host file or disk partition in which to save the checkpoint data. This can be done by setting the FSCheckpointPath database configuration option, or by specifying a command option. This ensures that there is always space available for checkpointing the database and that normal database operation will not be affected while its is being backed up.
The checkpoint location you should use depends on how busy the database is likely to be during the save. If it is likely to be quiet or idle, you can use the free space table. If it is likely to be busy, you should checkpoint to a host file or disk partition; a disk can be dedicated to this purpose if necessary.
tlmenu
The menu-driven tlmenu utility is primarily intended for administration of
Reality's Resilience features. It
includes commands to save and restore a database using