.
contact contact


dbrecover utility

» Usage | Notes | Examples | See also
 
.
  The dbrecover utility may be used to apply stored transactions from a set of forward-log files to the database environment. This is typically used as part of a disaster recovery after restoring the volume files from a recent backup.

For using dbrecover, the database server must have been running with FwLog=... configuration option in eloqdb.cfg enabled (and active). In addition, a recent backup of the database volume files as well as a complete set of forward log files since this backup must be available.

Usage

usage: dbrecover [options]
options:
 -t tmpdir    - directory to be used for temporary files
 -v           - verbose
 -d flags     - debug flags
 -c cfg       - configuration file name
 -b size      - Buffer cache size (MB)
 -T timestamp - recover until point in time (incl.)

timestamp formats:
 YYYY-MM-DD HH:MM:SS
 MM/DD/YYYY HH:MM:SS
 DD.MM.YYYY HH:MM:SS
 note: any character may be used to separate date and time
       time part is optional (defaults to 00:00:00)

The -c command line option is necessary if a database server configuration file is used which is different from eloqdb.cfg in its default location.

The -b command line option may be used to specify the buffer cache size (in MB). If not set, it defaults to 5 MB. Older Eloquence versions used the BufferCache setting from the database server configuration file.

The -T option may be used to specify a point-in-time beyond dbrecover stops applying changes. Once this point is passed, dbrecover will exit. Specifying the time is optional (defaults to 00:00:00). Date and time may be separated with space or other characters (shell quoting might be required).

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.

Notes

With Eloquence B.08.00 (and recent B.07.10 patches) the dbrecover utility was enhanced to support incremental recovery. Whenever the recovery process fails (e.g. due to insufficient temporary disk space), the dbrecover utility may be restarted and should be able to continue from the previous point. The original dbrecover utility required starting from the beginning, i.e. by restoring previous backup first.

Please note: When using incremental recovery the server process MUST NOT be started between dbrecover runs as this would change the volume files and/or generation count and make subsequent runs of dbrecover impossible or inconsistent (data corruption).

Also note that volume file operations outside transaction context, like dbvolextend or write mode of dbrepack, dbfsck or dbcfix make subsequent use of dbrecover impossible until a new baseline backup of the volume files is created.

After using dbrecover -T for performing a point-in-time recovery, you should move any unprocessed forward log files "out of the way" before starting the eloqdb server again. Otherwise the new server instance might fail to create new forward logs with conflicting generation numbers and either disable forward logging or panic (depending on the FwOnFailure setting in eloqdb.cfg).

Please note that it is not supported to use the dbrecover utility on a SLAVE server to perform a point-in-time recovery, then later resume replication. Doing so would very likely result in slave server data corruption and/or would cause the slave server to crash. For recovering a slave server to a specified point in time, you may restore a backup, start the eloqdb in slave role and then use dbrepl utility with option -T to apply transactions up to a given point in time. (these dbrepl -T runs may be done on the master or slave system, depending on where the relevant forward log files are available).

Examples

The following example uses dbrecover with option -T to apply transactions up to a specified point in time. This may be useful to populate a test system with a desired database state (for example, to re-run failed processing for error analysis). Another potential use case is recovery from catastrophic user or software errors that have occurred on a known point in time.
 ... (volume files were restored from previous backup)

$ dbrecover -c eloqdb.cfg -T '2005-11-27 17:54' -v

Opening root volume
Recovering from forward-log ...
R1: processing forward-log file: '/data/log/fw-4711-1.log'
R1: processing forward-log file: '/data/log/fw-4712-1.log'
14386 actions have been successfully recovered.
Database environment is now up-to-date until Sun Nov 27 17:53:46 2005.
done.

 ... (move any unprocessed /data/log/fw-*.log "out of the way")

 ... (eloqdb server may now be started again)

See also

Article on Database Forward-Logging and recovery in B.08.10 documentation.

Lab 2.3 on "forward logging and recovery" in Eloquence Workshop student guide.


 
 
 
  Privacy | GDPR / DSGVO | Webmaster | Terms of use | Impressum Revision: 2015-02-06  
  Copyright © 1995-2024 Marxmeier Software AG