Penguin
Annotated edit history of db_dump(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 DB_DUMP
2 !!!DB_DUMP
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OUTPUT FORMATS
7 ENVIRONMENT VARIABLES
8 SEE ALSO
9 ----
10 !!NAME
11
12
13 db_dump - the DB database dump utility
14 !!SYNOPSIS
15
16
17 __db_dump__ [[__-d__] [[__-f output__] db_file__
18 db_dump__ [[__-p__] [[__-f output__] [[__-h home__]
19 db_file
20 !!DESCRIPTION
21
22
23 The ''db_dump'' utility reads the database file
24 ''db_file'' and writes it to the standard output using a
25 portable flat-text format understood by the
26 ''db_load''(1) utility. The argument ''db_file'' must
27 be a file produced using the ''DB'' library
28 functions.
29
30
31 The options are as follows:
32
33
34 __-d__
35
36
37 Dump the specified database in a format helpful for
38 debugging the DB library routines. __The output format of
39 the -d option is not standard and may change, without
40 notice, between releases of the DB library.__
41
42
43 __-f__
44
45
46 Write to the specified ''file'' instead of to the
47 standard output.
48
49
50 __-h__
51
52
53 Specify a home directory for the database.
54
55
56 __-p__
57
58
59 If characters in either the key or data items are printing
60 characters (as defined by isprint(3)), use printing
61 characters in ''file'' to represent them. This option
62 permits users to use standard text editors to modify the
63 contents of databases.
64
65
66 Note, different systems may have different notions as to
67 what characters are ``printing'', and databases dumped in
68 this manner may be less portable to external
69 systems.
70
71
72 Dumping and reloading hash databases that use user-defined
73 hash functions will result in new databases that use the
74 default hash function. While using the default hash function
75 may not be optimal for the new database, it will continue to
76 work correctly.
77
78
79 Dumping and reloading btree databases that use user-defined
80 prefix or comparison functions will result in new databases
81 that use the default prefix and comparison functions. __In
82 this case, it is quite likely that the database will be
83 damaged beyond repair permitting neither record storage or
84 retrieval.__
85
86
87 The only available workaround for either case is to modify
88 the sources for the ''db_load''(1) utility to load the
89 database using the correct hash, prefix and comparison
90 functions.
91
92
93 The ''db_dump'' utility exits 0 on success, and
94 ''
95 !!OUTPUT FORMATS
96
97
98 There are two output formats used by
99 ''db_dump''.
100
101
102 In both output formats, the first few lines of the output
103 contain header information describing the underlying access
104 method, filesystem page size and other bookkeeping
105 information. This information is output in ``name=value''
106 pairs, where ``name'' may be any of the keywords listed in
107 the ''db_load''(1) manual page, and ``value'' will be its
108 value. While this header information can be edited before
109 the database is reloaded, there is rarely any reason to do
110 so, as all of this information can be overridden by
111 command-line arguments to ''db_load''.
112
113
114 Following the header information are the key/data pairs from
115 the database. If the database being dumped is of type
116 __btree__ or __hash__, the output will be paired lines
117 of text, where the first line of the pair is the key item,
118 and the second line of the pair is its corresponding data
119 item. If the database being dumped is of type __recno__,
120 the output will be lines of text, where each line is a new
121 data item for the database.
122
123
124 If the __-p__ option was specified, each output line will
125 consist of single characters representing any characters
126 from the database that were ``printing'', and backslash
127 (``'') escaped characters for any that were not. Backslash
128 characters appearing in the output mean one of two things:
129 if the backslash character precedes another backslash
130 character, it means that a literal backslash character
131 occurred in the key or data item. If the backslash character
132 precedes any other character, the next two characters should
133 be interpreted as hexadecimal specification of a single
134 character, e.g., ``0a'' is a newline character in the ASCII
135 character set.
136
137
138 If the __-p__ option was not specified, each output line
139 will consist of paired hexadecimal values, e.g., the line
140 ``726f6f74'' is the string ``root'' in the ASCII character
141 set.
142
143
144 In both output formats, a single newline character ends both
145 the key and data items.
146 !!ENVIRONMENT VARIABLES
147
148
149 The following environment variables affect the execution of
150 ''db_dump'':
151
152
153 DB_HOME
154
155
156 If the __-h__ option is not specified and the environment
157 variable ''DB_HOME'' is set, it is used as the path of
158 the database home, as described in
159 ''db_appinit''(3).
160 !!SEE ALSO
161
162
163 isprint(3)
164
165
166 The DB library is a family of groups of functions that
167 provides a modular programming interface to transactions and
168 record-oriented file access. The library includes support
169 for transactions, locking, logging and file page caching, as
170 well as various indexed access methods. Many of the
171 functional groups (e.g., the file page caching functions)
172 are useful independent of the other DB functions, although
173 some functional groups are explicitly based on other
174 functional groups (e.g., transactions and
175 logging).
176
177
178 ''db_archive''(1), ''db_checkpoint''(1),
179 ''db_deadlock''(1), ''db_dump''(1), ''db_load''(1),
180 ''db_recover''(1), ''db_stat''(1),
181 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.