MAN page from CentOS Other libdb-utils-5.3.28-42.el8_4.x86_64.rpm
Section: BerkeleyDB Utilities (1)
Updated: 06 December 2016Index
db_recover - Recover the database to a consistent state
[-cefVv] [-h home
] [-P password
] [-t [[CC]YY]MMDDhhmm[.SS]]]
utility must be run after an unexpected application, BerkeleyDB, or system failure to restore the database to a consistent state. Allcommitted transactions are guaranteed to appear after db_recover
has run, andall uncommitted transactions will be completely undone.
Note that this utility performs the same action as if the environment is opened withthe DB_RECOVER flag.If DB_RECOVER is specified on environment open, then use of this utility is not necessary.
- Perform catastrophic recovery instead of normal recovery.
- Retain the environment after running recovery. This optionwill rarely be used unless a DB_CONFIG file is present in the homedirectory. If a DB_CONFIG file is not present, then the regions will becreated with default parameter values.
- Display a message on the standard output showing the percent of recovery completed.
- -h home
- Specify a home directory for the database environment; bydefault, the current working directory is used.
- -P password
- Specify an environment password. Although Berkeley DB utilities overwritepassword strings as soon as possible, be aware there may be a window ofvulnerability on systems where unprivileged users can see command-linearguments or where utilities are not able to overwrite the memorycontaining the command-line arguments.
- Recover to the time specified rather than to the most current possibledate. The timestamp argument should be in the form[[CC]YY]MMDDhhmm[.SS] where each pair ofletters represents the following:
- The first two digits of the year (the century).
- The second two digits of the year. If "YY" is specified, but "CC" is not,a value for "YY" between 69 and 99 results in a "CC" value of 19. Otherwise,a "YY" value of 20 is used.
- The month of the year, from 1 to 12.
- The day of the month, from 1 to 31.
- The hour of the day, from 0 to 23.
- The minute of the hour, from 0 to 59.
- The second of the minute, from 0 to 61.
- If the "CC" and "YY" letter pairs are not specified, the values defaultto the current year. If the "SS" letter pair is not specified, the valuedefaults to 0.
- Write the library version number to the standard output, and exit.
- Run in verbose mode.
In the case of catastrophic recovery, an archival copy - orsnapshot - of all database files must be restored along withall of the log files written since the database file snapshot was made.(If disk space is a problem, log files may be referenced by symboliclinks).
If the failure was not catastrophic, the files present on the system at thetime of failure are sufficient to perform recovery.
If log files are missing, db_recover will identify the missinglog file(s) and fail, in which case the missing log files need to berestored and recovery performed again.
The db_recover utility uses a Berkeley DB environment (as described for the-h option, the environment variable DB_HOME, orbecause the utility was run in a directory containing a Berkeley DBenvironment). In order to avoid environment corruption when using aBerkeley DB environment, db_recover should always be given the chance todetach from the environment and exit gracefully. To cause db_recoverto release all environment resources and exit cleanly, send it aninterrupt signal (SIGINT).
utility exits 0 on success, and >0 if an error occurs.
- If the -h option is not specified and the environment variableDB_HOME is set, it is used as the path of the database home, as describedin DB_ENV->open.
If the application(s) that use the environment make use of any of the following methods:
then in order for this utility to run correctly, you need a DB_CONFIG file which sets the proper paths using the add_data_dir, or set_lg_dir configuration parameters.
- EXIT STATUS
- SEE ALSO
This document was created byman2html,using the manual pages.