dbtest

Description Examples Subcommands Arguments

Description

Inspect the contents of Directory Server local DB backends that store their information in Berkeley DB Java Edition databases. Only backends of type local DB can be inspected by this tool.

Each local DB backend has a root container, identified by backend ID. Each root container has an entry container for each base DN in the backend, identified by base DN. Each entry container has a number of database containers that store entries, attribute indexes and system indexes. The dbtest command allows the contents of root containers, entry containers and database containers to be inspected.

Examples

List all information about all local DB backends and their containers:

dbtest list-all

List and analyze all local DB backends and their containers:

dbtest list-all --analyze

List the root containers of all local DB backends:

dbtest list-root-containers

List the entry containers of the userRoot backend:

dbtest list-entry-containers --backendID userRoot

List the database containers of all the entry containers of the userRoot backend:

dbtest list-database-containers --backendID userRoot

List and analyze the database containers of all the entry containers of the userRoot backend and print statistical information:

dbtest list-database-containers --backendID userRoot --analyze

Dump the id2entry database container of the entry container with base DN 'dc=example,dc=com' in the userRoot backend:

dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \
     --databaseName id2entry

List the status of indexes in the userRoot backend that are in the entry container with the base DN 'dc=example,dc=com':

dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com

Subcommands

dump-attribute-tokens dump-database-container dump-dn-tokens dump-metadata dump-object-class-tokens list-all list-database-containers list-entry-containers list-index-status list-root-containers

dump-attribute-tokens

Dump information about the attribute description tokens defined for a backend

dump-attribute-tokens Examples

Dump information about the attribute description tokens defined in the 'userRoot' backend:

dbtest dump-attribute-tokens --backendID userRoot

dump-attribute-tokens Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

dump-database-container

Dump records from a database container

There are options to dump only records in a specified key range or to dump only records with a minimum or maximum data size

dump-database-container Examples

Dump the id2entry database container of the entry container with base DN 'dc=example,dc=com' in the userRoot backend:

dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \
     --databaseName id2entry

dump-database-container Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

-b {baseDN}
--baseDN {baseDN}

Description The base DN of the entry container to debug
Required Yes
Multi-Valued No

-d {databaseName}
--databaseName {databaseName}

Description The name of the database container to debug
Required Yes
Multi-Valued No

-p
--skipDecode

Description Do not try to decode the JE data to their appropriate types

-K {maxKeyValue}
--maxKeyValue {maxKeyValue}

Description Only show records with keys that should be ordered before the provided value using the comparator for the database container
Required No
Multi-Valued No

-k {minKeyValue}
--minKeyValue {minKeyValue}

Description Only show records with keys that should be ordered after the provided value using the comparator for the database container
Required No
Multi-Valued No

-S {maxDataSize}
--maxDataSize {maxDataSize}

Description Only show records whose data is no larger than the provided value
Default Value -1
Required No
Multi-Valued No

-s {minDataSize}
--minDataSize {minDataSize}

Description Only show records whose data is no smaller than the provided value
Default Value -1
Required No
Multi-Valued No

-l
--onlyExceedingLimit

Description Only dump index information for keys that have exceeded the index entry limit

--entryFilter {filter}

Description An optional filter that can be used to indicate which entries to include in the output. This is only applicable when dumping the id2entry database container, and if it is not provided, then all entries will be included
Required No
Multi-Valued No

-u
--summarize

Description Only print a summary of each record in the specified database

dump-dn-tokens

Dump information about the parent DN tokens defined in a backend

dump-dn-tokens Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

dump-metadata

Dump information from a backend's metadata database

dump-metadata Examples

Dump information about the metadata database for the 'userRoot' backend:

dbtest dump-metadata --backendID userRoot

dump-metadata Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

dump-object-class-tokens

Dump information about the object class set tokens defined for a backend

dump-object-class-tokens Examples

Dump information about the object class set tokens defined in the 'userRoot' backend:

dbtest dump-object-class-tokens --backendID userRoot

Dump information about the parent DN tokens defined in the 'userRoot' backend:

dbtest dump-object-class-tokens --backendID userRoot

dump-object-class-tokens Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

list-all

List all information about all local DB backends and their containers

The information listed includes the backend ID and the database directory for all root containers, the base DN, the JE database prefix, and the number of entries for all entry containers, the database name, type, and the number of records for all database containers. Depending on the number of backends, indexes, and entries, this operation could take a while to complete

list-all Examples

List all information about all local DB backends and their containers:

dbtest list-all

List and analyze all local DB backends and their containers:

dbtest list-all --analyze

list-all Arguments

-a
--analyze

Description Analyze all database containers and include total key/data size, average key/data size, max key/data size, and the histogram of the overall distribution of key/data sizes in the output. Analyzing large databases with millions of entries may take a significantly longer time to complete

list-database-containers

List the database containers for an entry container

Information listed for a database container includes the database name and type, and the number of records in the database container

list-database-containers Examples

List the database containers of all the entry containers of the userRoot backend:

dbtest list-database-containers --backendID userRoot

List and analyze the database containers of all the entry containers of the userRoot backend and print statistical information:

dbtest list-database-containers --backendID userRoot --analyze

list-database-containers Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

-b {baseDN}
--baseDN {baseDN}

Description The base DN of the entry container to debug
Required No
Multi-Valued No

-d {databaseName}
--databaseName {databaseName}

Description The name of the database container to debug
Required No
Multi-Valued No

-a
--analyze

Description Analyze all database containers and include total key/data size, average key/data size, max key/data size, and the histogram of the overall distribution of key/data sizes in the output. Analyzing large databases with millions of entries may take a significantly longer time to complete

list-entry-containers

List the entry containers for a root container

The information listed for an entry container includes the base DN, the JE database prefix and the number of entries

list-entry-containers Examples

List the entry containers of the userRoot backend:

dbtest list-entry-containers --backendID userRoot

list-entry-containers Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

list-index-status

List the status of indexes in an entry container

Information listed for an index includes the index name and an indication as to whether the contents of the index are trusted. If the contents of an index are not trusted, then it must be rebuilt with the rebuild-index command

list-index-status Examples

List the status of indexes in the userRoot backend that are in the entry container with the base DN 'dc=example,dc=com':

dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com

list-index-status Arguments

-n {backendName}
--backendID {backendName}

Description The backend ID of the local DB backend to debug
Required Yes
Multi-Valued No

-b {baseDN}
--baseDN {baseDN}

Description The base DN of the entry container to debug
Required Yes
Multi-Valued Yes

list-root-containers

List the root containers used by all local DB backends

The information listed for a root container includes the backend ID and the database directory

list-root-containers Examples

List the root containers of all local DB backends:

dbtest list-root-containers

Arguments

-V
--version

Description Display Directory Server version information

-H
--help

Description Display general usage information

--help-debug

Description Display help for using debug options
Advanced Yes

--help-subcommands

Description Display a list of all available subcommands