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.
dbtest list-all
dbtest list-all --analyze
dbtest list-root-containers
dbtest list-entry-containers --backendID userRoot
dbtest list-database-containers --backendID userRoot
dbtest list-database-containers --backendID userRoot --analyze
dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \ --databaseName id2entry
dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com
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
dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \ --databaseName id2entry
-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 |
-u
--summarize
Description | Only print a summary of each record in the specified database |
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
dbtest list-all
dbtest list-all --analyze
-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 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
dbtest list-database-containers --backendID userRoot
dbtest list-database-containers --backendID userRoot --analyze
-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 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
dbtest list-entry-containers --backendID userRoot
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
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
dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com
-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 the root containers used by all local DB backends
The information listed for a root container includes the backend ID and the database directory
dbtest list-root-containers
-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 |