Library Version 18.1.40

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

## db_convert

    db_convert [-blVv] [-h home] [-P password] [-S o | v] 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.

- -S

  Verify the specified database before performing db_convert. The conversion is not performed if the database is corrupted. Use this option when you are not sure about the integrity of the database.

  - o

    Skip the database checks for btree and duplicate sort order and for hashing. See also the -o option for db_verify.

  - v

    Perform the standard verification on the database as performed by db_verify without options.

- -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 DB_ENV->open() method.

Prev | Up | Next
db_checkpoint | Home | db_deadlock