• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/programmer_reference/
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>Chapter��22.�� Dumping and Reloading Databases</title>
7    <link rel="stylesheet" href="gettingStarted.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 Programmer's Reference Guide" />
10    <link rel="up" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
11    <link rel="prev" href="ext_php.html" title="Using Berkeley DB with PHP" />
12    <link rel="next" href="dumpload_format.html" title="Dump output formats" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Chapter��22.��
19		Dumping and Reloading Databases
20        </th>
21        </tr>
22        <tr>
23          <td width="20%" align="left"><a accesskey="p" href="ext_php.html">Prev</a>��</td>
24          <th width="60%" align="center">��</th>
25          <td width="20%" align="right">��<a accesskey="n" href="dumpload_format.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="chapter" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title"><a id="dumpload"></a>Chapter��22.��
35		Dumping and Reloading Databases
36        </h2>
37          </div>
38        </div>
39      </div>
40      <div class="toc">
41        <p>
42          <b>Table of Contents</b>
43        </p>
44        <dl>
45          <dt>
46            <span class="sect1">
47              <a href="dumpload.html#dumpload_utility">The db_dump and db_load utilities</a>
48            </span>
49          </dt>
50          <dt>
51            <span class="sect1">
52              <a href="dumpload_format.html">Dump output formats</a>
53            </span>
54          </dt>
55          <dt>
56            <span class="sect1">
57              <a href="dumpload_text.html">Loading text into databases</a>
58            </span>
59          </dt>
60        </dl>
61      </div>
62      <div class="sect1" lang="en" xml:lang="en">
63        <div class="titlepage">
64          <div>
65            <div>
66              <h2 class="title" style="clear: both"><a id="dumpload_utility"></a>The db_dump and db_load utilities</h2>
67            </div>
68          </div>
69        </div>
70        <p>There are three utilities used for dumping and loading Berkeley DB databases: the <a href="../api_reference/C/db_dump.html" class="olink">db_dump utility</a>, the <a href="../api_reference/C/db_dump.html" class="olink">db_dump185 utility</a> and the <a href="../api_reference/C/db_load.html" class="olink">db_load utility</a>.</p>
71        <p>The <a href="../api_reference/C/db_dump.html" class="olink">db_dump utility</a> and the <a href="../api_reference/C/db_dump.html" class="olink">db_dump185 utility</a> dump Berkeley DB databases into a flat-text representation of the data that can be read by <a href="../api_reference/C/db_load.html" class="olink">db_load utility</a>.  The only difference between them is that the <a href="../api_reference/C/db_dump.html" class="olink">db_dump utility</a> reads Berkeley DB version 2 and greater database formats, whereas the <a href="../api_reference/C/db_dump.html" class="olink">db_dump185 utility</a> reads Berkeley DB version 1.85 and 1.86 database formats.</p>
72        <p>The <a href="../api_reference/C/db_load.html" class="olink">db_load utility</a> reads either the output format used by the dump utilities or (optionally) a flat-text representation created using other tools, and stores it into a Berkeley DB database.</p>
73        <p>Dumping and reloading Hash databases that use user-defined hash functions will result in new databases that use the default hash function. Although using the default hash function may not be optimal for the new database, it will continue to work correctly.</p>
74        <p>Dumping and reloading Btree databases that use user-defined prefix or comparison functions will result in new databases that use the default prefix and comparison functions. In this case, it is quite likely that applications will be unable to retrieve records, and it is possible that the load process itself will fail.</p>
75        <p>The only available workaround for either Hash or Btree databases is to modify the sources for the <a href="../api_reference/C/db_load.html" class="olink">db_load utility</a> to load the database using the correct hash, prefix, and comparison functions.</p>
76      </div>
77    </div>
78    <div class="navfooter">
79      <hr />
80      <table width="100%" summary="Navigation footer">
81        <tr>
82          <td width="40%" align="left"><a accesskey="p" href="ext_php.html">Prev</a>��</td>
83          <td width="20%" align="center">��</td>
84          <td width="40%" align="right">��<a accesskey="n" href="dumpload_format.html">Next</a></td>
85        </tr>
86        <tr>
87          <td width="40%" align="left" valign="top">Using Berkeley DB with PHP��</td>
88          <td width="20%" align="center">
89            <a accesskey="h" href="index.html">Home</a>
90          </td>
91          <td width="40%" align="right" valign="top">��Dump output formats</td>
92        </tr>
93      </table>
94    </div>
95  </body>
96</html>
97