| 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_replicate</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_recover.html" title="db_recover" /> |
| 12 | <link rel="next" href="db_sql_codegen.html" title="db_sql_codegen" /> |
| 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_replicate</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="db_recover.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_sql_codegen.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_replicate"></a>db_replicate</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">db_replicate [-MVv] [-h home] |
| 42 | [-L file] [-P password] [-T num_threads] [-t secs] </pre> |
| 43 | <p> |
| 44 | The <span class="command"><strong>db_replicate</strong></span> utility is a daemon process |
| 45 | that provides replication/HA services on a transactional |
| 46 | environment. This utility enables you to upgrade an existing |
| 47 | Transactional Data Store application to an HA application with |
| 48 | minor modifications. For more information on the db_replicate |
| 49 | utility, see the |
| 50 | <a href="../../programmer_reference/rep_replicate.html" class="olink">Running Replication Using the db_replicate Utility </a> |
| 51 | section in the <span class="emphasis"><em>Berkeley DB Programmer's Reference Guide.</em></span> |
| 52 | </p> |
| 53 | <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> |
| 54 | <h3 class="title">Note</h3> |
| 55 | <p> |
| 56 | This utility is not supported for use with the DB SQL APIs. |
| 57 | </p> |
| 58 | </div> |
| 59 | <p> |
| 60 | The options are as follows: |
| 61 | </p> |
| 62 | <div class="itemizedlist"> |
| 63 | <ul type="disc"> |
| 64 | <li> |
| 65 | <p> |
| 66 | <span class="bold"><strong>-h</strong></span> |
| 67 | </p> |
| 68 | <p> |
| 69 | Specify a home directory for the database environment; by default, the |
| 70 | current working directory is used. |
| 71 | </p> |
| 72 | </li> |
| 73 | <li> |
| 74 | <p> |
| 75 | <span class="bold"><strong>-L</strong></span> |
| 76 | </p> |
| 77 | <p> |
| 78 | Log the execution of the <span class="command"><strong>db_replicate</strong></span> |
| 79 | utility to the specified file in the following format, |
| 80 | where <span class="emphasis"><em>###</em></span> is the process ID, and the |
| 81 | date is the time the utility was started. |
| 82 | </p> |
| 83 | <pre class="programlisting"> db_replicate: ### Wed Jun 15 01:23:45 EDT 1995 </pre> |
| 84 | <p> |
| 85 | Additionally, events such as site role changes will be |
| 86 | noted in the log file. This file will be removed if the |
| 87 | <span class="command"><strong>db_replicate</strong></span> utility exits gracefully. |
| 88 | </p> |
| 89 | </li> |
| 90 | <li> |
| 91 | <p> |
| 92 | <span class="bold"><strong>-M</strong></span> |
| 93 | </p> |
| 94 | <p> |
| 95 | Start the <span class="command"><strong>db_replicate</strong></span> utility to be |
| 96 | the master site of the replication group. Otherwise, |
| 97 | the site will be started as a client replica. |
| 98 | </p> |
| 99 | </li> |
| 100 | <li> |
| 101 | <p> |
| 102 | <span class="bold"><strong>-P</strong></span> |
| 103 | </p> |
| 104 | <p> |
| 105 | Specify an environment password. Although Berkeley DB utilities overwrite password |
| 106 | strings as soon as possible, be aware there may be a window of vulnerability on |
| 107 | systems where unprivileged users can see command-line arguments or where utilities |
| 108 | are not able to overwrite the memory containing the command-line arguments. |
| 109 | </p> |
| 110 | </li> |
| 111 | <li> |
| 112 | <p> |
| 113 | <span class="bold"><strong>-T</strong></span> |
| 114 | </p> |
| 115 | <p> |
| 116 | Specify the number of replication message processing threads. |
| 117 | </p> |
| 118 | </li> |
| 119 | <li> |
| 120 | <p> |
| 121 | <span class="bold"><strong>-t</strong></span> |
| 122 | </p> |
| 123 | <p> |
| 124 | Specify how often (in seconds) the utility will check |
| 125 | for program interruption and resend the last log record. |
| 126 | </p> |
| 127 | </li> |
| 128 | <li> |
| 129 | <p> |
| 130 | <span class="bold"><strong>-V</strong></span> |
| 131 | </p> |
| 132 | <p> |
| 133 | Write the library version number to the standard output, and exit. |
| 134 | </p> |
| 135 | </li> |
| 136 | <li> |
| 137 | <p> |
| 138 | <span class="bold"><strong>-v</strong></span> |
| 139 | </p> |
| 140 | <p> |
| 141 | Turn on replication verbose messages. These messages will |
| 142 | be written to the standard output and will be quite |
| 143 | voluminous. |
| 144 | </p> |
| 145 | </li> |
| 146 | </ul> |
| 147 | </div> |
| 148 | <p> |
| 149 | The <span class="command"><strong>db_replicate</strong></span> utility uses a Berkeley DB |
| 150 | environment (as described for the |
| 151 | <span class="bold"><strong>-h</strong></span> option, the environment variable |
| 152 | <span class="bold"><strong>DB_HOME</strong></span>, or because the utility |
| 153 | was run in a directory containing a Berkeley DB environment). In |
| 154 | order to avoid environment corruption when using a Berkeley DB |
| 155 | environment, <span class="command"><strong>db_replicate</strong></span> should always be |
| 156 | given the chance to detach from the environment and exit |
| 157 | gracefully. To cause <span class="command"><strong>db_replicate</strong></span> to release |
| 158 | all environment resources and exit cleanly, send it an interrupt |
| 159 | signal (SIGINT). |
| 160 | </p> |
| 161 | <p> |
| 162 | The <span class="command"><strong>db_replicate</strong></span> utility does not attempt to |
| 163 | create the Berkeley DB shared memory regions if they do not |
| 164 | already exist. The application that creates the region should be |
| 165 | started first, and once the region is created, the |
| 166 | <span class="command"><strong>db_replicate</strong></span> utility should be started. The |
| 167 | application must use the |
| 168 | <a class="xref" href="envopen.html#envopen_DB_INIT_REP"> |
| 169 | <code class="literal">DB_INIT_REP</code> |
| 170 | </a> |
| 171 | and <a class="xref" href="envopen.html#envopen_DB_THREAD"> |
| 172 | <code class="literal">DB_THREAD</code> |
| 173 | </a> |
| 174 | flags when creating the environment. |
| 175 | </p> |
| 176 | <p> |
| 177 | The <span class="command"><strong>db_replicate</strong></span> utility exits 0 on success, |
| 178 | and >0 if an error occurs. |
| 179 | </p> |
| 180 | <div class="sect2" lang="en" xml:lang="en"> |
| 181 | <div class="titlepage"> |
| 182 | <div> |
| 183 | <div> |
| 184 | <h3 class="title"><a id="idp10845168"></a>Environment Variables</h3> |
| 185 | </div> |
| 186 | </div> |
| 187 | </div> |
| 188 | <div class="sect3" lang="en" xml:lang="en"> |
| 189 | <div class="titlepage"> |
| 190 | <div> |
| 191 | <div> |
| 192 | <h4 class="title"><a id="idp10845424"></a>DB_HOME</h4> |
| 193 | </div> |
| 194 | </div> |
| 195 | </div> |
| 196 | <p> |
| 197 | If the <span class="bold"><strong>-h</strong></span> option is not specified and |
| 198 | the environment variable DB_HOME is set, it is used as the path of the |
| 199 | database home, as described in the |
| 200 | <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method. |
| 201 | </p> |
| 202 | </div> |
| 203 | </div> |
| 204 | </div> |
| 205 | <div class="navfooter"> |
| 206 | <hr /> |
| 207 | <table width="100%" summary="Navigation footer"> |
| 208 | <tr> |
| 209 | <td width="40%" align="left"><a accesskey="p" href="db_recover.html">Prev</a> </td> |
| 210 | <td width="20%" align="center"> |
| 211 | <a accesskey="u" href="utilities.html">Up</a> |
| 212 | </td> |
| 213 | <td width="40%" align="right"> <a accesskey="n" href="db_sql_codegen.html">Next</a></td> |
| 214 | </tr> |
| 215 | <tr> |
| 216 | <td width="40%" align="left" valign="top">db_recover </td> |
| 217 | <td width="20%" align="center"> |
| 218 | <a accesskey="h" href="index.html">Home</a> |
| 219 | </td> |
| 220 | <td width="40%" align="right" valign="top"> db_sql_codegen</td> |
| 221 | </tr> |
| 222 | </table> |
| 223 | </div> |
| 224 | </body> |
| 225 | </html> |