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