5.7 Restoring from a Log File

As you have seen from the previous section, there is a lot to consider when using transaction logging. The database restore command, drestore(C-1), has two modes of operation. It can restore the database to a consistent state, or it can do an unconditional restore. In the latter case, the database is restored up to the point of the system crash without regard to the state of any transaction.

Normally, you should let drestore restore the database to a consistent state, weeding out incomplete transactions. For accounting systems this is necessary to keep the accounts in balance. Transaction logging should be used for any database that has strong relations between RMSfiles.

A database is restored from the log file by running the command drestore. It has two flags: -v and -u. If the -u flag is used, an unconditional restore is done (all transactions are restored). Without the flag, only completed and consistent transactions are restored. The -v flag (for verbose) produces information about the stages of the restore process. For more detail regarding the process of restoring an RMSfile from backups and a logfile, see C/Base Reference Manual Chapter 2,