Debian Codegraph @

docs/api_reference/CXX/db_checkpoint.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_checkpoint</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_archive.html" title="db_archive" />
12 <link rel="next" href="db_deadlock.html" title="db_deadlock" />
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_checkpoint</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="db_archive.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_deadlock.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_checkpoint"></a>db_checkpoint</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">db_checkpoint [-1Vv] [-h home]
42 [-k kbytes] [-L file] [-P password] [-p min] </pre>
43 <p>
44 The <span class="command"><strong>db_checkpoint</strong></span> utility is a daemon process that monitors the
45 database log, and periodically calls
46 <a class="xref" href="txncheckpoint.html" title="DbEnv::txn_checkpoint()">DbEnv::txn_checkpoint()</a>
47 to checkpoint it.
48 </p>
49 <p>
50 The options are as follows:
51 </p>
52 <div class="itemizedlist">
53 <ul type="disc">
54 <li>
55 <p>
56 <span class="bold"><strong>-1</strong></span>
57 </p>
58 <p>
59 Force a single checkpoint of the log (regardless of whether or not
60 there has been activity since the last checkpoint), and then exit.
61 </p>
62 <p>
63 When the <span class="bold"><strong>-1</strong></span> flag is specified, the
64 <span class="command"><strong>db_checkpoint</strong></span> utility will checkpoint the log even if unable to find
65 an existing database environment. This functionality is useful when
66 upgrading database environments from one version of Berkeley DB to
67 another.
68 </p>
69 </li>
70 <li>
71 <p>
72 <span class="bold"><strong>-h</strong></span>
73 </p>
74 <p>
75 Specify a home directory for the database environment; by default, the
76 current working directory is used.
77 </p>
78 </li>
79 <li>
80 <p>
81 <span class="bold"><strong>-k</strong></span>
82 </p>
83 <p>
84 Checkpoint the database at least as often as every <span class="bold"><strong>kbytes</strong></span> of log file are written.
85 </p>
86 </li>
87 <li>
88 <p>
89 <span class="bold"><strong>-L</strong></span>
90 </p>
91 <p>
92 Log the execution of the <span class="command"><strong>db_checkpoint</strong></span> utility to the specified file
93 in the following format, where <span class="emphasis"><em>###</em></span> is the process
94 ID, and the date is the time the utility was started.
95 </p>
96 <pre class="programlisting"> db_checkpoint: ### Wed Jun 15 01:23:45 EDT 1995 </pre>
97 <p>
98 This file will be removed if the <span class="command"><strong>db_checkpoint</strong></span>
99 utility exits gracefully.
100 </p>
101 </li>
102 <li>
103 <p>
104 <span class="bold"><strong>-P</strong></span>
105 </p>
106 <p>
107 Specify an environment password. Although Berkeley DB utilities overwrite password
108 strings as soon as possible, be aware there may be a window of vulnerability on
109 systems where unprivileged users can see command-line arguments or where utilities
110 are not able to overwrite the memory containing the command-line arguments.
111 </p>
112 </li>
113 <li>
114 <p>
115 <span class="bold"><strong>-p</strong></span>
116 </p>
117 <p>
118 Checkpoint the database at least every <span class="bold"><strong>min</strong></span> minutes
119 if there has been any activity since the last checkpoint.
120 </p>
121 </li>
122 <li>
123 <p>
124 <span class="bold"><strong>-V</strong></span>
125 </p>
126 <p>
127 Write the library version number to the standard output, and exit.
128 </p>
129 </li>
130 <li>
131 <p>
132 <span class="bold"><strong>-v</strong></span>
133 </p>
134 <p>
135 Write the time of each checkpoint attempt to the standard output.
136 </p>
137 </li>
138 </ul>
139 </div>
140 <p>
141 At least one of the <span class="bold"><strong>-1</strong></span>, <span class="bold"><strong>-k</strong></span>, and <span class="bold"><strong>-p</strong></span>
142 options must be specified.
143 </p>
144 <p>
145 The <span class="command"><strong>db_checkpoint</strong></span> utility uses a Berkeley DB
146 environment (as described for the <span class="bold"><strong>-h</strong></span>
147 option, the environment variable
148 <span class="bold"><strong>DB_HOME</strong></span>, or because the utility
149 was run in a directory containing a Berkeley DB
150 environment).
151 In order to avoid environment corruption when using a Berkeley DB
152 environment, <span class="command"><strong>db_checkpoint</strong></span> should always be given the chance to detach
153 from the environment and exit gracefully. To cause <span class="command"><strong>db_checkpoint</strong></span> to
154 release all environment resources and exit cleanly, send it an
155 interrupt signal (SIGINT).
156 </p>
157 <p>
158 The <span class="command"><strong>db_checkpoint</strong></span> utility does not attempt to create the Berkeley DB
159 shared memory regions if they do not already exist. The application
160 that creates the region should be started first, and once the region
161 is created, the <span class="command"><strong>db_checkpoint</strong></span> utility should be started.
162 </p>
163 <p>
164 The <span class="command"><strong>db_checkpoint</strong></span> utility exits 0 on success, and &gt;0 if an error
165 occurs.
166 </p>
167 <div class="sect2" lang="en" xml:lang="en">
168 <div class="titlepage">
169 <div>
170 <div>
171 <h3 class="title"><a id="idp10587944"></a>Environment Variables</h3>
172 </div>
173 </div>
174 </div>
175 <div class="sect3" lang="en" xml:lang="en">
176 <div class="titlepage">
177 <div>
178 <div>
179 <h4 class="title"><a id="idp10588200"></a>DB_HOME</h4>
180 </div>
181 </div>
182 </div>
183 <p>
184 If the <span class="bold"><strong>-h</strong></span> option is not specified and
185 the environment variable DB_HOME is set, it is used as the path of the
186 database home, as described in the
187 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method.
188 </p>
189 </div>
190 </div>
191 </div>
192 <div class="navfooter">
193 <hr />
194 <table width="100%" summary="Navigation footer">
195 <tr>
196 <td width="40%" align="left"><a accesskey="p" href="db_archive.html">Prev</a> </td>
197 <td width="20%" align="center">
198 <a accesskey="u" href="utilities.html">Up</a>
199 </td>
200 <td width="40%" align="right"> <a accesskey="n" href="db_deadlock.html">Next</a></td>
201 </tr>
202 <tr>
203 <td width="40%" align="left" valign="top">db_archive </td>
204 <td width="20%" align="center">
205 <a accesskey="h" href="index.html">Home</a>
206 </td>
207 <td width="40%" align="right" valign="top"> db_deadlock</td>
208 </tr>
209 </table>
210 </div>
211 </body>
212 </html>