Debian Codegraph @

docs/api_reference/C/db_upgrade.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>db_upgrade</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="utilities.html" title="Appendix A.  Berkeley DB Command Line Utilities" />
11 <link rel="prev" href="db_tuner.html" title="db_tuner" />
12 <link rel="next" href="db_verify.html" title="db_verify" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">db_upgrade</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="db_tuner.html">Prev</a> </td>
25 <th width="60%" align="center">Appendix A. 
26 Berkeley DB Command Line Utilities
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="db_verify.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="db_upgrade"></a>db_upgrade</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">db_upgrade [-NsVv] [-h home] [-P password] file ... </pre>
42 <p>
43 The <span class="command"><strong>db_upgrade</strong></span> utility upgrades the Berkeley DB version of one or more
44 files and the databases they contain to the current release version.
45 </p>
46 <p>
47 The options are as follows:
48 </p>
49 <div class="itemizedlist">
50 <ul type="disc">
51 <li>
52 <p>
53 <span class="bold"><strong>-h</strong></span>
54 </p>
55 <p>
56 Specify a home directory for the database environment; by default, the
57 current working directory is used.
58 </p>
59 </li>
60 <li>
61 <p>
62 <span class="bold"><strong>-N</strong></span>
63 </p>
64 <p>
65 Do not acquire shared region mutexes while running. Other problems,
66 such as potentially fatal errors in Berkeley DB, will be ignored as
67 well. This option is intended only for debugging errors, and should
68 not be used under any other circumstances.
69 </p>
70 </li>
71 <li>
72 <p>
73 <span class="bold"><strong>-P</strong></span>
74 </p>
75 <p>
76 Specify an environment password. Although Berkeley DB utilities
77 overwrite password strings as soon as possible, be aware there may be
78 a window of vulnerability on systems where unprivileged users can see
79 command-line arguments or where utilities are not able to overwrite
80 the memory containing the command-line arguments.
81 </p>
82 </li>
83 <li>
84 <p>
85 <span class="bold"><strong>-s</strong></span>
86 </p>
87 <p>
88 This flag is only meaningful when upgrading databases from releases
89 before the Berkeley DB 3.1 release.
90 </p>
91 <p>
92 As part of the upgrade from the Berkeley DB 3.0 release to the 3.1
93 release, the on-disk format of duplicate data items changed. To
94 correctly upgrade the format requires that applications specify
95 whether duplicate data items in the database are sorted or not.
96 Specifying the <span class="bold"><strong>-s</strong></span> flag means that the
97 duplicates are sorted; otherwise, they are assumed to be unsorted.
98 Incorrectly specifying the value of this flag may lead to database
99 corruption.
100 </p>
101 <p>
102 Because the <span class="command"><strong>db_upgrade</strong></span> utility upgrades a physical file (including all
103 the databases it contains), it is not possible to use <span class="command"><strong>db_upgrade</strong></span> to
104 upgrade files where some of the databases it includes have sorted
105 duplicate data items, and some of the databases it includes have
106 unsorted duplicate data items. If the file does not have more than a
107 single database, if the databases do not support duplicate data items,
108 or if all the databases that support duplicate data items support the
109 same style of duplicates (either sorted or unsorted), <span class="command"><strong>db_upgrade</strong></span> will
110 work correctly as long as the <span class="bold"><strong>-s</strong></span> flag
111 is correctly specified. Otherwise, the file cannot be upgraded using
112 <span class="command"><strong>db_upgrade</strong></span>, and must be upgraded manually using the
113 <a class="xref" href="db_dump.html" title="db_dump">db_dump</a> and
114 <a class="xref" href="db_load.html" title="db_load">db_load</a> utilities.
115 </p>
116 </li>
117 <li>
118 <p>
119 <span class="bold"><strong>-V</strong></span>
120 </p>
121 <p>
122 Write the library version number to the standard output, and exit.
123 </p>
124 </li>
125 <li>
126 <p>
127 <span class="bold"><strong>-v</strong></span>
128 </p>
129 <p>
130 Run in verbose mode, displaying a message for each successful upgrade.
131 </p>
132 </li>
133 </ul>
134 </div>
135 <p>
136 <span class="bold"><strong>It is important to realize that Berkeley DB
137 database upgrades are done in place, and so are potentially
138 destructive.</strong></span> This means that if the system crashes during
139 the upgrade procedure, or if the upgrade procedure runs out of disk
140 space, the databases may be left in an inconsistent and unrecoverable
141 state. See <a href="../../programmer_reference/am_upgrade.html" class="olink">Upgrading databases</a> for more information.
142 </p>
143 <p>
144 The <span class="command"><strong>db_upgrade</strong></span> utility may be used with a Berkeley DB environment (as
145 described for the <span class="bold"><strong>-h</strong></span> option, the
146 environment variable <span class="bold"><strong>DB_HOME</strong></span>, or
147 because the utility was run in a directory containing a Berkeley DB
148 environment). In order to avoid environment corruption when using a
149 Berkeley DB environment, <span class="command"><strong>db_upgrade</strong></span> should always be given the chance
150 to detach from the environment and exit gracefully. To cause
151 <span class="command"><strong>db_upgrade</strong></span> to release all environment resources and exit cleanly, send
152 it an interrupt signal (SIGINT).
153 </p>
154 <p>
155 The <span class="command"><strong>db_upgrade</strong></span> utility exits 0 on success, and &gt;0 if an error
156 occurs.
157 </p>
158 <div class="sect2" lang="en" xml:lang="en">
159 <div class="titlepage">
160 <div>
161 <div>
162 <h3 class="title"><a id="idp55470624"></a>Environment Variables</h3>
163 </div>
164 </div>
165 </div>
166 <div class="sect3" lang="en" xml:lang="en">
167 <div class="titlepage">
168 <div>
169 <div>
170 <h4 class="title"><a id="idp55470816"></a>DB_HOME</h4>
171 </div>
172 </div>
173 </div>
174 <p>
175 If the <span class="bold"><strong>-h</strong></span> option is not specified and
176 the environment variable DB_HOME is set, it is used as the path of the
177 database home, as described in the
178 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>
179 method.
180 </p>
181 </div>
182 </div>
183 </div>
184 <div class="navfooter">
185 <hr />
186 <table width="100%" summary="Navigation footer">
187 <tr>
188 <td width="40%" align="left"><a accesskey="p" href="db_tuner.html">Prev</a> </td>
189 <td width="20%" align="center">
190 <a accesskey="u" href="utilities.html">Up</a>
191 </td>
192 <td width="40%" align="right"> <a accesskey="n" href="db_verify.html">Next</a></td>
193 </tr>
194 <tr>
195 <td width="40%" align="left" valign="top">db_tuner </td>
196 <td width="20%" align="center">
197 <a accesskey="h" href="index.html">Home</a>
198 </td>
199 <td width="40%" align="right" valign="top"> db_verify</td>
200 </tr>
201 </table>
202 </div>
203 </body>
204 </html>