NNAAMMEE db_dump - the DB database dump utility SSYYNNOOPPSSIISS ddbb__dduummpp [--dd] [--ff oouuttppuutt] db_file ddbb__dduummpp [--pp] [--ff oouuttppuutt] [--hh hhoommee] db_file ddbb__dduummpp118855 [--pp] [--ff oouuttppuutt] db_file DDEESSCCRRIIPPTTIIOONN The _d_b___d_u_m_p utility reads the database file _d_b___f_i_l_e and writes it to the standard output using a portable flat- text format understood by the _d_b___l_o_a_d(1) utility. The argument _d_b___f_i_l_e must be a file produced using the _D_B library functions. The _d_b___d_u_m_p_1_8_5 utility is similar to the _d_b___d_u_m_p utility except that it reads databases in the format used by DB versions 1.85 and 1.86. The options are as follows: --dd Dump the specified database in a format helpful for debugging the DB library routines. TThhee oouuttppuutt ffoorrmmaatt ooff tthhee --dd ooppttiioonn iiss nnoott ssttaannddaarrdd aanndd mmaayy cchhaannggee,, wwiitthhoouutt nnoottiiccee,, bbeettwweeeenn rreelleeaasseess ooff tthhee DDBB lliibbrraarryy.. --ff Write to the specified _f_i_l_e instead of to the stan- dard output. --hh Specify a home directory for the database. As DB versions before 2.0 did not support the concept of a database ``home'', _d_b___d_u_m_p_1_8_5 does not support this option. --pp If characters in either the key or data items are printing characters (as defined by _i_s_p_r_i_n_t(3)), use printing characters in _f_i_l_e to represent them. This option permits users to use standard text editors to modify the contents of databases. Note, different systems may have different notions as to what characters are ``printing'', and databases dumped in this manner may be less portable to exter- nal systems. Dumping and reloading hash databases that use user-defined hash functions will result in new databases that use the default hash function. While using the default hash func- tion may not be optimal for the new database, it will con- tinue to work correctly. Dumping and reloading btree databases that use user- defined prefix or comparison functions will result in new databases that use the default prefix and comparison func- tions. IInn tthhiiss ccaassee,, iitt iiss qquuiittee lliikkeellyy tthhaatt tthhee ddaattaabbaassee wwiillll bbee ddaammaaggeedd bbeeyyoonndd rreeppaaiirr ppeerrmmiittttiinngg nneeiitthheerr rreeccoorrdd ssttoorraaggee oorr rreettrriieevvaall.. The only available workaround for either case is to modify the sources for the _d_b___l_o_a_d(1) utility to load the database using the correct hash, prefix and comparison functions. The _d_b___d_u_m_p_1_8_5 utility may not be available on your system as it is not always installed when the DB libraries and utilities are installed. If you are unable to find it, see your system administrator for further information. The _d_b___d_u_m_p utility exits 0 on success, and >0 if an error occurs. The _d_b___d_u_m_p_1_8_5 utility exits 0 on success, and >0 if an error occurs. OOUUTTPPUUTT FFOORRMMAATTSS There are two output formats used by _d_b___d_u_m_p and _d_b___d_u_m_p_1_8_5. 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 ``name=value'' pairs, where ``name'' may be any of the keywords listed in the _d_b___l_o_a_d(1) manual page, and ``value'' will be its value. While this header information can be edited before the database is reloaded, there is rarely any reason to do so, as all of this information can be overridden by com- mand-line arguments to _d_b___l_o_a_d. Following the header information are the key/data pairs from the database. If the database being dumped is of type bbttrreeee or hhaasshh, 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 rreeccnnoo, the output will be lines of text, where each line is a new data item for the database. If the --pp option was specified, each output line will con- sist of single characters representing any characters from the database that were ``printing'', and backslash (``\'') escaped characters for any that were not. Backslash char- acters appearing in the output mean one of two things: if the backslash character precedes another backslash charac- ter, it means that a literal backslash character occurred in the key or data item. If the backslash character pre- cedes any other character, the next two characters should be interpreted as hexadecimal specification of a single character, e.g., ``\0a'' is a newline character in the ASCII character set. If the --pp option was not specified, each output line will consist of paired hexadecimal values, e.g., the line ``726f6f74'' is the string ``root'' in the ASCII character set. In both output formats, a single newline character ends both the key and data items. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS The following environment variables affect the execution of _d_b___d_u_m_p: DB_HOME If the --hh option is not specified and the environment variable _D_B___H_O_M_E is set, it is used as the path of the database home, as described in _d_b___a_p_p_i_n_i_t(3). SSEEEE AALLSSOO _i_s_p_r_i_n_t(3) The DB library is a family of groups of functions that provides a modular programming interface to transactions and record-oriented file access. The library includes support for transactions, locking, logging and file page caching, as well as various indexed access methods. Many of the functional groups (e.g., the file page caching functions) are useful independent of the other DB func- tions, although some functional groups are explicitly based on other functional groups (e.g., transactions and logging). For a general description of the DB package, see _d_b___i_n_t_r_o(3). _d_b___a_r_c_h_i_v_e(1), _d_b___c_h_e_c_k_p_o_i_n_t(1), _d_b___d_e_a_d_l_o_c_k(1), _d_b___d_u_m_p(1), _d_b___l_o_a_d(1), _d_b___r_e_c_o_v_e_r(1), _d_b___s_t_a_t(1), _d_b___i_n_t_r_o(3), _d_b___a_p_p_i_n_i_t(3), _d_b___c_u_r_s_o_r(3), _d_b___d_b_m(3), _d_b___i_n_t_e_r_n_a_l(3), _d_b___l_o_c_k(3), _d_b___l_o_g(3), _d_b___m_p_o_o_l(3), _d_b___o_p_e_n(3), _d_b___t_h_r_e_a_d(3), _d_b___t_x_n(3)