Overview

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:

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.

Logical Save Commands

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 FILE-SAVE, but allows you to delay the file save for overnight execution.

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 ACCOUNT-SAVE, but also saves a list of the saved accounts.

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 FILE-SAVE, by saving or restoring groups of accounts in parallel using multiple tape devices.

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 or M-A-S tape with the VERIFY-SAVE command.
  • The SAVE command also dumps one or more file sections and accounts to tape. The ACCOUNT-SAVE, FILE-SAVE, F-S and M-A-S Procs all use this and should be used in preference to it.
Logical Restore Commands

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 with FILE-SAVE or F-S tapes.
  • To restore one or more accounts, use ACCOUNT-RESTORE (O. Use with FILE-SAVE, F-S or ACCOUNT-SAVE tapes.

SEL-RESTORE Selectively restores files and items. Use with FILE-SAVE, F-S, and ACCOUNT-SAVE tapes.

M-A-R Used to restore one or more accounts from an M-A-S tape.

T-LOAD Selectively restores file items from a T-DUMP tape.

dbsave See 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; see Transferring a Database for details.
  • 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:

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.

Physical Save Commands

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 FILE-SAVE. It can be used while users are logged on and can save to multiple tape devices simultaneously for even greater speed.

realdump This is the host equivalent of SAVE-IMAGE.

Notes:

  • You can verify a SAVE-IMAGE or realdump tape with the VERIFY-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.
Physical Restore Commands

LOAD-IMAGE This restores a database that was saved using SAVE-IMAGE or realdump. Selective restore of individual files and accounts is not possible.

realload This 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; see Transferring a Database for details.
  • 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

This menu-driven utility is primarily intended for administration of Reality's Resilience features. It includes commands to save and restore a database using FILE-SAVE/ACCOUNT-RESTORE, dbsave or SAVE-IMAGE/LOAD-IMAGE. Refer to The tlmenu Utility for details.

Go to top button