1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<! "@(#)format.so 10.2 (Sleepycat) 11/2/98">
<!Copyright 1997, 1998 by Sleepycat Software, Inc. All rights reserved.>
<html>
<body bgcolor=white>
<head>
<title>Berkeley DB Reference Guide: Dumping and Reloading</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btr
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
</head>
<h3>Berkeley DB Reference Guide: Dumping and Reloading</h3>
<p>
<h1 align=center>Dump output formats</h1>
<p>
There are two output formats used by <a href="../../utility/db_dump.html">db_dump</a> and <a href="../../utility/db_dump.html">db_dump185</a>.
<p>
In both output formats, the first few lines of the output contain header
information describing the underlying access method, filesystem page size
and other bookkeeping information. This information is output in
<b>name=value</b> pairs, where <b>name</b> may be any of the keywords
listed in the <a href="../../utility/db_load.html">db_load</a> manual page, and <b>value</b> will be its
value. While this header information can be manually edited before the
database is reloaded, there is rarely any reason to do so, as all of this
information can also be specified or overridden by command-line arguments
to <a href="../../utility/db_load.html">db_load</a>.
<p>
Following the header information are the key/data pairs from the database.
If the database being dumped is of type Btree or Hash, the output will be
paired lines of text, where the first line of the pair is the key item,
and the second line of the pair is its corresponding data item. If the
database being dumped is of type Recno, the output will be lines of text,
where each line is the next data item for the database.
<p>
If the <b>-p</b> option to <a href="../../utility/db_dump.html">db_dump</a> or <a href="../../utility/db_dump.html">db_dump185</a> was
specified, the key/data lines will consist of single characters representing
any characters from the database that are <i>printing characters</i>
and backslash \ escaped characters for any that were not.
Backslash characters appearing in the output mean one of two things: if
the backslash character precedes another backslash character, it means
that a literal backslash character occurred in the key or data item. If
the backslash character precedes any other character, the next two
characters must be interpreted as hexadecimal specification of a single
character, e.g., \0a is a newline character in the ASCII
character set.
<p>
Although some care should be exercised, it is perfectly reasonable to use
standard text editors and tools to edit databases dumped using the
<b>-p</b> option before re-loading them using the <a href="../../utility/db_load.html">db_load</a>
utility.
<p>
Note that the definition of a printing character may vary from system to
system, and so database representations created using the <b>-p</b>
option may be less portable than those created without it.
<p>
If the <b>-p</b> option to <a href="../../utility/db_dump.html">db_dump</a> or <a href="../../utility/db_dump.html">db_dump185</a> is
not specified, each output line will consist of paired hexadecimal values,
e.g., the line <b>726f6f74</b> is the string <b>root</b> in the ASCII
character set.
<p>
In all output formats, a single newline character ends both the key and
data items.
<p>
<a href="../../ref/dumpload/utility.html"><img src="../../images/prev.gif"></a>
<a href="../../ref/toc.html"><img src="../../images/toc.gif"></a>
<a href="../../ref/dumpload/text.html"><img src="../../images/next.gif"></a>
</tt>
</body>
</html>
|