### Berkeley DB Reference Guide: Dumping and Reloading |

# The db_dump and db_load utilities

There are three utilities used for dumping and loading Berkeley DB databases: db_dump, db_dump185 and db_load.

The db_dump and db_dump185 utilities dump Berkeley DB databases into a flat-text representation of the data that can be read by db_load. The only difference between them is that db_dump reads Berkeley DB version 2 and greater database formats, while db_dump185 reads Berkeley DB version 1.85 and 1.86 database formats.

The db_load utility reads either the output format used by the dump utilities or, optionally, a flat-text representation created using other tools, and stores it into a Berkeley DB database.

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 function may not be optimal for the new database, it will continue 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 functions. In which case it is quite likely that applications will be unable to retrieve records, and possible that the load process itself will fail.

The only available workaround for either Hash or Btree databases is to modify the sources for the db_load utility to load the database using the correct hash, prefix and comparison functions.

Copyright Sleepycat Software