db_recover(1) | General Commands Manual | db_recover(1) |
db_recover
db_recover |
[-ceVv ] [-h
home] [-P
password] [-t
[[CC]YY]MMDDhhmm[.SS]] |
The db_recover
utility must be run after
an unexpected application, Berkeley DB, or system failure to restore the
database to a consistent state. All committed transactions are guaranteed to
appear after db_recover has run, and all uncommitted transactions will be
completely undone.
The options are as follows:
-c
-e
-h
-P
-t
-V
-v
In the case of catastrophic recovery, an archival copy -- or snapshot -- of all database files must be restored along with all of the log files written since the database file snapshot was made. (If disk space is a problem, log files may be referenced by symbolic links). For further information on creating a database snapshot, see Archival Procedures. For further information on performing recovery, see Recovery Procedures.
If the failure was not catastrophic, the files present on the system at the time of failure are sufficient to perform recovery.
If log files are missing, db_recover will identify the missing log file(s) and fail, in which case the missing log files need to be restored and recovery performed again.
The db_recover utility uses a Berkeley DB environment (as described for the -h option, the environment variable DB_HOME, or because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db_recover should always be given the chance to detach from the environment and exit gracefully. To cause db_recover to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT).
The db_recover utility exits 0 on success, and >0 if an error occurs.
DB_HOME
db_archive(1), db_checkpoint(1), db_deadlock(1), db_dump(1), db_load(1), db_printlog(1), db_stat(1), db_upgrade(1), db_verify(1)
December 3, 2003 | Darwin |