1DB_DUMP(1)                   BerkeleyDB Utilities                   DB_DUMP(1)
2
3
4

NAME

6       db_dump - Write database file using flat-text format
7

SYNOPSIS

9       db_dump  [-klNpRrV]  [-b  blob-dir]  [-d ahr] [-f output] [-h home] [-P
10       password] [-s database] [-D bytes] file
11
12       db_dump [-kNpV] [-d ahr] [-f output] [-h home] -m database
13
14       db_dump185 [-p] [-f output] file
15

DESCRIPTION

17       The db_dump utility reads the database file and writes it to the  stan‐
18       dard output using a portable flat-text format understood by the db_load
19       utility.  The file argument must be a file produced using the  Berkeley
20       DB library functions.  The db_dump185 utility is similar to the db_dump
21       utility, except that it reads databases in the format used by  Berkeley
22       DB versions 1.85 and 1.86.
23

OPTIONS

25       -b blob-dir
26              Specifies  the directory where BLOB data is stored for the data‐
27              base you are dumping.
28
29       -d     Dump the specified database in a format  helpful  for  debugging
30              the Berkeley DB library routines.
31
32              a      Display all information.
33
34              h      Display only page headers.
35
36              r      Do  not  display the free-list or pages on the free list.
37                     This mode is used by the recovery tests.
38
39              The output format of the -d  option  is  not  standard  and  may
40              change,  without  notice,  between  releases  of the Berkeley DB
41              library.
42
43       -D bytes
44              Specifies the maximum number of bytes to dump for each  key/data
45              item found in the specified database.  This option is only valid
46              when -da is also specified. This option overrides the value  set
47              for the "set_data_len" parameter in your DB_CONFIG file, if any.
48
49       -f output
50              Write  to  the  specified output file instead of to the standard
51              output.
52
53       -h home
54              Specify a  home  directory  for  the  database  environment;  by
55              default, the current working directory is used.
56
57       -k     Dump record numbers from Queue and Recno databases as keys.
58
59       -l     List the databases stored in the file.
60
61       -N     Do not acquire shared region mutexes while running.  Other prob‐
62              lems, such as potentially fatal errors in Berkeley DB,  will  be
63              ignored  as  well.   This  option is intended only for debugging
64              errors, and should not be used under any other circumstances.
65
66       -P password
67              Specify an environment password.  Although Berkeley DB utilities
68              overwrite  password  strings as soon as possible, be aware there
69              may be a window of vulnerability on systems  where  unprivileged
70              users  can see command-line arguments or where utilities are not
71              able to overwrite the memory containing the  command-line  argu‐
72              ments.
73
74       -p     If characters in either the key or data items are printing char‐
75              acters (as defined by isprint(3)), use  printing  characters  in
76              file  to represent them.  This option permits users to use stan‐
77              dard text editors and tools to modify the contents of databases.
78
79              Note: different systems may have different  notions  about  what
80              characters  are  considered  printing  characters, and databases
81              dumped in this manner may be less portable to external systems.
82
83       -R     Aggressively salvage data from a possibly corrupt file.  The  -R
84              flag  differs from the -r option in that it will return all pos‐
85              sible data from the file at the risk of also  returning  already
86              deleted  or  otherwise  nonsensical  items.  Data dumped in this
87              fashion will almost certainly have to be edited by hand or other
88              means before the data is ready for reload into another database
89
90       -r     Salvage  data  from  a  possibly  corrupt  file.  When used on a
91              uncorrupted database, this option should return equivalent  data
92              to a normal dump, but most likely in a different order.
93
94       -s database
95              Specify a single database to dump.  If no database is specified,
96              all databases in the database file are dumped.
97
98       -V     Write the library version number to  the  standard  output,  and
99              exit.
100
101       Dumping  and  reloading Hash databases that use user-defined hash func‐
102       tions will result in new databases that use the default hash  function.
103       Although using the default hash function may not be optimal for the new
104       database, it will continue to work correctly.
105
106       Dumping and reloading Btree databases that use user-defined  prefix  or
107       comparison  functions will result in new databases that use the default
108       prefix and comparison functions.  In this case, it is quite likely that
109       the  database  will  be damaged beyond repair permitting neither record
110       storage or retrieval.
111
112       The only available workaround for either case is to modify the  sources
113       for  the  db_load  utility to load the database using the correct hash,
114       prefix, and comparison functions.
115
116       The db_dump utility output format is documented in the Dump Output For‐
117       mats section of the Berkeley DB Reference Guide.
118
119       The  db_dump  utility  may  be  used with a Berkeley DB environment (as
120       described for the -h  option,  the  environment  variable  DB_HOME,  or
121       because  the  utility  was  run in a directory containing a Berkeley DB
122       environment).  In order to avoid environment corruption  when  using  a
123       Berkeley  DB  environment, db_dump should always be given the chance to
124       detach from the environment and exit gracefully.  To cause  db_dump  to
125       release  all  environment resources and exit cleanly, send it an inter‐
126       rupt signal (SIGINT).
127
128       Even when using a Berkeley DB database environment, the db_dump utility
129       does not use any kind of database locking if it is invoked with the -d,
130       -R, or -r arguments.   If used with one of these arguments, the db_dump
131       utility may only be safely run on databases that are not being modified
132       by any other process; otherwise, the output may be corrupt.
133

EXIT STATUS

135       The db_dump utility exits 0 on success, and >0 if an error occurs.
136

ENVIRONMENT

138       DB_HOME
139              If the -h option is not specified and the  environment  variable
140              DB_HOME  is set, it is used as the path of the database home, as
141              described in DB_ENV->open.
142

SEE ALSO

144       db_archive(1)    db_checkpoint(1)    db_deadlock(1)     db_hotbackup(1)
145       db_log_verify(1)   db_load(1)  db_printlog(1)  db_recover(1)  db_repli‐
146       cate(1) db_stat(1) db_tuner(1) db_upgrade(1) db_verify(1)
147
148
149
150BerkeleyDB 5.3.28              06 December 2016                     DB_DUMP(1)
Impressum