Debian Codegraph @

docs/api_reference/CXX/envset_backup_config.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>DbEnv::set_backup_config()</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="env.html" title="Chapter 5.  The DbEnv Handle" />
11 <link rel="prev" href="envset_backup_callbacks.html" title="DbEnv::set_backup_callbacks()" />
12 <link rel="next" href="envset_data_dir.html" title="DbEnv::set_data_dir()" />
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">DbEnv::set_backup_config()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_backup_callbacks.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DbEnv Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_data_dir.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="envset_backup_config"></a>DbEnv::set_backup_config()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 DB_ENV-&gt;set_backup_config(db_backup_config_t option, u_int32_t value);</pre>
44 <p>
45 The <code class="methodname">DbEnv::set_backup_config()</code> method
46 configures tuning parameters for the hot backup APIs. See the
47 <a class="xref" href="envbackup.html" title="DbEnv::backup()">DbEnv::backup()</a>
48 and
49 <a class="xref" href="envdbbackup.html" title="DbEnv::dbbackup()">DbEnv::dbbackup()</a>
50 methods for a description of the hot backup APIs.
51 </p>
52 <p>
53 The <code class="methodname">DbEnv::set_backup_config()</code> method
54 configures operations performed using the specified
55 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a> handle, not all operations
56 performed on the underlying database environment.
57 </p>
58 <p>
59 The <code class="methodname">DbEnv::set_backup_config()</code> method may
60 be called at any time during the life of the application.
61 </p>
62 <p>
63 The <code class="methodname">DbEnv::set_backup_config()</code> <span>
64
65 <span>
66 method either returns a non-zero error value or throws an
67 exception that encapsulates a non-zero error value on
68 failure, and returns 0 on success.
69 </span>
70 </span>
71 </p>
72 <div class="sect2" lang="en" xml:lang="en">
73 <div class="titlepage">
74 <div>
75 <div>
76 <h3 class="title"><a id="idp7152992"></a>Parameters</h3>
77 </div>
78 </div>
79 </div>
80 <div class="sect3" lang="en" xml:lang="en">
81 <div class="titlepage">
82 <div>
83 <div>
84 <h4 class="title"><a id="idp7194016"></a>option</h4>
85 </div>
86 </div>
87 </div>
88 <p>
89 The <span class="bold"><strong>option</strong></span> parameter
90 identifies the backup parameter to be modified. It
91 must be one of the following:
92 </p>
93 <div class="itemizedlist">
94 <ul type="disc">
95 <li>
96 <p>
97 <code class="literal">DB_BACKUP_WRITE_DIRECT</code>
98 </p>
99 <p>
100 Turning this on causes direct I/O to be used when
101 writing pages to the disk. For some environments,
102 direct I/O can provide faster write throughput, but
103 usually it is slower because the OS buffer pool
104 offers asynchronous activity.
105 </p>
106 <p>
107 By default, this option is turned off.
108 </p>
109 </li>
110 <li>
111 <p>
112 <code class="literal">DB_BACKUP_READ_COUNT</code>
113 </p>
114 <p>
115 Configures the number of pages to read before
116 pausing. Increasing this value increases the amount
117 of I/O the backup process performs for any given
118 time interval. If your application is already
119 heavily I/O bound, setting this value to a lower
120 number may help to improve your overall data
121 throughput by reducing the I/O demands placed on
122 your system.
123 </p>
124 <p>
125 By default, all pages are read without a pause.
126 </p>
127 </li>
128 <li>
129 <p>
130 <code class="literal">DB_BACKUP_READ_SLEEP</code>
131 </p>
132 <p>
133 Configures the number of microseconds to sleep
134 between batches of reads. Increasing this value
135 decreases the amount of I/O the backup process
136 performs for any given time interval. If your
137 application is already heavily I/O bound, setting
138 this value to a higher number may help to improve
139 your overall data throughput by reducing the I/O
140 demands placed on your system.
141 </p>
142 </li>
143 <li>
144 <p>
145 <code class="literal">DB_BACKUP_SIZE</code>
146 </p>
147 <p>
148 Configures the size of the buffer, in bytes, to
149 read from the database. Default is 1 megabyte.
150 </p>
151 </li>
152 </ul>
153 </div>
154 </div>
155 <div class="sect3" lang="en" xml:lang="en">
156 <div class="titlepage">
157 <div>
158 <div>
159 <h4 class="title"><a id="idp7206960"></a>value</h4>
160 </div>
161 </div>
162 </div>
163 <p>
164 The <span class="bold"><strong>value</strong></span> parameter sets
165 the configuration value for the option identified by the
166 <span class="bold"><strong>option</strong></span> parameter. For
167 those options which can only be turned on or off, this
168 parameter should be set to <code class="literal">0</code>
169 for off and <code class="literal">1</code> for on. Otherwise, set
170 this parameter to an integer value that represents the
171 number of units for which you are configuring the backup
172 APIs.
173 </p>
174 </div>
175 </div>
176 <div class="sect2" lang="en" xml:lang="en">
177 <div class="titlepage">
178 <div>
179 <div>
180 <h3 class="title"><a id="idp7188040"></a>Class</h3>
181 </div>
182 </div>
183 </div>
184 <p>
185 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>,
186 </p>
187 </div>
188 <div class="sect2" lang="en" xml:lang="en">
189 <div class="titlepage">
190 <div>
191 <div>
192 <h3 class="title"><a id="idp7209120"></a>See Also</h3>
193 </div>
194 </div>
195 </div>
196 <p>
197 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>,
198 <a class="xref" href="envget_backup_config.html" title="DbEnv::get_backup_config()">DbEnv::get_backup_config()</a>,
199 <a class="xref" href="envbackup.html" title="DbEnv::backup()">DbEnv::backup()</a>,
200 <a class="xref" href="envdbbackup.html" title="DbEnv::dbbackup()">DbEnv::dbbackup()</a>
201 </p>
202 </div>
203 </div>
204 <div class="navfooter">
205 <hr />
206 <table width="100%" summary="Navigation footer">
207 <tr>
208 <td width="40%" align="left"><a accesskey="p" href="envset_backup_callbacks.html">Prev</a> </td>
209 <td width="20%" align="center">
210 <a accesskey="u" href="env.html">Up</a>
211 </td>
212 <td width="40%" align="right"> <a accesskey="n" href="envset_data_dir.html">Next</a></td>
213 </tr>
214 <tr>
215 <td width="40%" align="left" valign="top">DbEnv::set_backup_callbacks() </td>
216 <td width="20%" align="center">
217 <a accesskey="h" href="index.html">Home</a>
218 </td>
219 <td width="40%" align="right" valign="top"> DbEnv::set_data_dir()</td>
220 </tr>
221 </table>
222 </div>
223 </body>
224 </html>