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 have the following advantages:
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-SAVE Saves a complete database to tape. Can be used while users are logged on.
F-S This
is similar to
ACCOUNT-SAVE Saves 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-S Saves one or more accounts to tape.
Similar to
T-DUMP and
ST-DUMP
Save selected file items to tape.
dbsave
This utility performs
Reality database file-saves and restores with greater speed than can be achieved
with
Notes:
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-RESTORE
Selectively restores files and items. Use with
M-A-R Used to restore one or more accounts
from an
T-LOAD
Selectively restores file items from a
dbsave See Logical
Save Commands
Notes:
Physical saves are very much faster than logical saves – especially when performed to multiple tape decks simultaneously. However, they do have the following restrictions:
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-IMAGE Saves a
complete database to tape. Creates a physical backup of a complete database and can be several times faster
than
realdump
This is the host equivalent of
Notes:
LOAD-IMAGE This restores a database that was saved using
realload This host command allows you to restore a physical backup created using the realdump host command or the SAVE-IMAGE TCL command.
Notes:
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.
This menu-driven utility is primarily intended for administration of
Reality's Resilience features. It
includes commands to save and restore a database using