1DB_RECOVER(1) BerkeleyDB Utilities DB_RECOVER(1)
2
3
4
6 db_recover - Recover the database to a consistent state
7
9 db_recover [-cefVv] [-h home] [-P password] [-t [[CC]YY]MMDDhhmm[.SS]]]
10
12 The db_recover utility must be run after an unexpected application,
13 Berkeley DB, or system failure to restore the database to a consistent
14 state. All committed transactions are guaranteed to appear after
15 db_recover has run, and all uncommitted transactions will be completely
16 undone.
17
18 Note that this utility performs the same action as if the environment
19 is opened with the DB_RECOVER flag. If DB_RECOVER is specified on
20 environment open, then use of this utility is not necessary.
21
23 -c Perform catastrophic recovery instead of normal recovery.
24
25 -e Retain the environment after running recovery. This option will
26 rarely be used unless a DB_CONFIG file is present in the home
27 directory. If a DB_CONFIG file is not present, then the regions
28 will be created with default parameter values.
29
30 -f Display a message on the standard output showing the percent of
31 recovery completed.
32
33 -h home
34 Specify a home directory for the database environment; by
35 default, the current working directory is used.
36
37 -P password
38 Specify an environment password. Although Berkeley DB utilities
39 overwrite password strings as soon as possible, be aware there
40 may be a window of vulnerability on systems where unprivileged
41 users can see command-line arguments or where utilities are not
42 able to overwrite the memory containing the command-line argu‐
43 ments.
44
45 -t Recover to the time specified rather than to the most current
46 possible date. The timestamp argument should be in the form
47 [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the
48 following:
49
50 CC The first two digits of the year (the century).
51
52 YY The second two digits of the year. If "YY" is specified,
53 but "CC" is not, a value for "YY" between 69 and 99
54 results in a "CC" value of 19. Otherwise, a "YY" value
55 of 20 is used.
56
57 MM The month of the year, from 1 to 12.
58
59 DD The day of the month, from 1 to 31.
60
61 hh The hour of the day, from 0 to 23.
62
63 mm The minute of the hour, from 0 to 59.
64
65 SS The second of the minute, from 0 to 61.
66
67 If the "CC" and "YY" letter pairs are not specified, the values
68 default to the current year. If the "SS" letter pair is not
69 specified, the value defaults to 0.
70
71 -V Write the library version number to the standard output, and
72 exit.
73
74 -v Run in verbose mode.
75
76 In the case of catastrophic recovery, an archival copy - or snapshot -
77 of all database files must be restored along with all of the log files
78 written since the database file snapshot was made. (If disk space is a
79 problem, log files may be referenced by symbolic links).
80
81 If the failure was not catastrophic, the files present on the system at
82 the time of failure are sufficient to perform recovery.
83
84 If log files are missing, db_recover will identify the missing log
85 file(s) and fail, in which case the missing log files need to be
86 restored and recovery performed again.
87
88 The db_recover utility uses a Berkeley DB environment (as described for
89 the -h option, the environment variable DB_HOME, or because the utility
90 was run in a directory containing a Berkeley DB environment). In order
91 to avoid environment corruption when using a Berkeley DB environment,
92 db_recover should always be given the chance to detach from the envi‐
93 ronment and exit gracefully. To cause db_recover to release all envi‐
94 ronment resources and exit cleanly, send it an interrupt signal (SIG‐
95 INT).
96
98 The db_recover utility exits 0 on success, and >0 if an error occurs.
99
101 DB_HOME
102 If the -h option is not specified and the environment variable
103 DB_HOME is set, it is used as the path of the database home, as
104 described in DB_ENV->open.
105
107 If the application(s) that use the environment make use of any of the
108 following methods:
109
110 DB_ENV->add_data_dir
111
112 DB_ENV->set_data_dir
113
114 DB_ENV->set_lg_dir
115
116 then in order for this utility to run correctly, you need a DB_CONFIG
117 file which sets the proper paths using the add_data_dir, or set_lg_dir
118 configuration parameters.
119
121 db_archive(1) db_checkpoint(1) db_deadlock(1) db_dump(1) db_hot‐
122 backup(1) db_log_verify(1) db_load(1) db_printlog(1) db_replicate(1)
123 db_stat(1) db_tuner(1) db_upgrade(1) db_verify(1)
124
125
126
127BerkeleyDB 5.3.28 06 December 2016 DB_RECOVER(1)