Library Version 18.1.25

db_convert
Prev | Appendix A. Berkeley DB Command Line Utilities | Next

## db_convert

    db_convert [-blVv] [-h home] [-P password] file ...

The db_convert utility converts one or more files and the databases they contain to a specified byte order. If the byte order is not specified, databases are converted to the native byte order of the machine.

The options are as follows:

- -b

  Convert the files and databases to the big endian order.

- -h

  Specify a home directory for the database environment; by default, the current working directory is used.

- -l

  Convert the files and databases to the little endian order.

- -P

  Specify an environment password. Although Berkeley DB utilities overwrite password strings as soon as possible, be aware there may be a window of vulnerability on systems where unprivileged users can see command-line arguments or where utilities are not able to overwrite the memory containing the command-line arguments.

- -V

  Write the library version number to the standard output, and exit.

- -v

  Run in verbose mode, displaying a message for each successful convert.

It is important to realize that Berkeley DB database conversions are done in place, and so are potentially destructive. This means that if the system crashes during the convert procedure, or if the convert procedure runs out of disk space, the databases may be left in an inconsistent and unrecoverable state.

The db_convert utility may be used with a Berkeley DB environment (as described for the -h option, the environment variable DB_HOME, or because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db_convert should always be given the chance to detach from the environment and exit gracefully. To cause db_convert to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT).

The db_convert utility exits 0 on success, and >0 if an error occurs.

### Environment Variables

#### DB_HOME

If the -h option is not specified and the environment variable DB_HOME is set, it is used as the path of the database home, as described in the DbEnv::open() method.

Prev | Up | Next
db_checkpoint | Home | db_deadlock