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

EXIT STATUS

125       The db_dump utility exits 0 on success, and >0 if an error occurs.
126

ENVIRONMENT

128       DB_HOME
129              If the -h option is not specified and the  environment  variable
130              DB_HOME  is set, it is used as the path of the database home, as
131              described in DB_ENV->open.
132

SEE ALSO

134       db_archive(1)    db_checkpoint(1)    db_deadlock(1)     db_hotbackup(1)
135       db_log_verify(1)   db_load(1)  db_printlog(1)  db_recover(1)  db_repli‐
136       cate(1) db_stat(1) db_tuner(1) db_upgrade(1) db_verify(1)
137
138
139
140BerkeleyDB 5.3.21              06 December 2016                     DB_DUMP(1)
Impressum