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