Eloquence B.07.00 Release Notes
Eloquence B.07.00 - Database Forward-logging[ Main document | Back ]
Please note: The forward-logging functionality has been introduced with Eloquence B.07.00 pre-release #1. However, the configuration options have changed recently. If you already use forward-logging with an Eloquence B.07.00 pre-release please make sure to apply the required changes to your existing configuration. IntroductionThe forward logging functionality provides additional protection against system failure and speeds up recovery in case of a fatal problem. When forward logging is active, all changes to a database environment since the last (on-lin or off-line) backup are recorded in a separate log file. In case of a system failure those changes may be applied to a previous backup, thus ensuring that no data is lost and database integrity is maintained.Forward logging adds an incremental backup mechanism to the Eloquence database which allows recovery of database changes since the last backup in case of a disk or operating system failure. If necessary, a backup is restored and the changes since the last backup are applied with the dbrecover utility.
Recovering from abnormal server terminationWhenever a database environment was not shutdown cleanly, the Eloquence database server performs an internal recovery during its next start.The situation of a database environment not shutdown cleanly can be caused by various reasons:
A startup-recovery will be successful if all data and log volumes are present and accessible and if their contents have not been corrupted. In particular, if the operating system had a chance to write all pending modifications to the volumes after the server terminated abnormally, the subsequent startup-recovery will succeed. If any of these conditions is not met, it is possible that a startup-recovery will fail. This normally requires restoration of all data volumes from the last (on-line or off-line) backup. The database server will probably start successfully afterward. However, any database modifications since the last backup would be lost unless they were contained in a forward-log. Combined with the last backup, the recovery from a forward-log would restore the contents of the entire database environment up to the very moment when the problem occurred. In this way, a forward-log provides an additional safety mechanism in case the startup-recovery cannot be performed successfully.
Configuring Forward-loggingTo use forward-logging, the FwLog entry in the new [ForwardLog] section of the database server configuration file (eloqdb6.cfg by default) must be configured.The [ForwardLog] section is contained in the new template configuration file which is part of Eloquence B.07.00 (eloqdb6.cfg in the /opt/eloquence6/newconfig/config directory on HP-UX and Linux, eloqdb6.cfg.sam in the etc installation subdirectory on Windows). To update an existing configuration file, add the following lines just before the [Volumes] section at the end of the file: ### Forward log [ForwardLog] # FwLog Configures the file, device or pipe to be used for forward- # logging. Using the %N token in the file name activates # automatic file management (not possible for devices or pipes). # By default, forward-logging is inactive. # # The examples below configure an automatically managed file # and a pipe which compresses the data on-the-fly: #FwLog = /mnt/disk2/data/db-forward-%N.log #FwLog = |gzip -c >/mnt/disk2/data/db-forward.log.gz # FwRecovery Configures the file, device or pipe to be used during forward # recovery. If not set, the Log setting is used by default. # # The example below configures a pipe which uncompresses the # data on-the-fly: #FwRecovery = |gzip -dc /mnt/disk2/data/db-forward.log.gz # FwOnFailure Configures the action to be taken in case the forward-log # cannot be written, e.g. due to insufficient disk space. # Possible values are disable or panic. If set to disable, # forward-logging will be disabled on failure. As soon as the # problem is solved it can be manually enabled using dbctl. # If set to panic, the eloqdb6 server will issue a panic and # abort itself. The default value is disable. #FwOnFailure = disable # FwMaxSize Limits the maximum size of automatically managed forward-log # files (in megabytes). If not set or set to zero, the file # size limit is 2 gigabytes. The default value is 0 (not set). #FwMaxSize = 0 ### Data base environment ... Once the FwLog configuration entry has been defined (and the server restarted), forward-logging will take place at the specified location. Additionally, it can be temporarily disabled and re-enabled during server runtime. This is discussed in detail in the Forward-Log Management section below. The FwLog configuration entry specifies where the forward-log is be written. The following options are available:
Choosing an appropriate forward-log location is vital. It should provide enough capacity so that all modifications of a particular database environment occurring between two (on-line or off-line) backups can safely be stored. In addition, it should be separated physically from the database environment (the volumes). We recommend using a separate disk or a fast tape device. This ensures that the forward-log would still be usable even if one of the disks where the volumes are located suffers a hardware failure.
Forward-log managementOnce forward-logging has been enabled it is managed automatically. This mainly affects the creation of forward-log files.
For administrative purposes, forward-logging can be temporarily disabled and re-enabled during server runtime. You could, for example, disable it during a dbimport or dbrestore which normally would cause the forward-log to grow very quickly. This is controlled by means of the dbctl utility:
The dbrecover utilityShould a recovery from a forward-log become necessary, it can be performed by means of the new dbrecover utility. The overall procedure would be as follows:
The dbrecover utility's usage is: dbrecover [options] options: -t tmpdir - directory to be used for temporary files -v - verbose -d flags - debug flags -c cfg - configuration file nameThe -c command line option is necessary if a database server configuration file is used which is different from eloqdb6.cfg in its default location. During recovery, incomplete user transactions are stored in temporary files until they have been completed. Because of this, an appropriate amount of temporary disk space is needed. By default, these temporary files are created in the current directory from where the dbrecover utility has been invoked. This can be overridden with the -t command line option. Whenever the recovery process fails (eg. due to insufficient temporary disk space) the entire process must be repeated, starting with step 1 (restoring the data volumes from the last backup). This is necessary because a partial recovery from a forward-log would have modified the data volumes and the required starting point would no longer be present.
© Copyright 2002-2003 Marxmeier Software AG. All rights reserved. Revision: 2003-03-19 |