verify-index

The verify-index command validates directory index data.

This command is not supported for the proxy.

Synopsis

verify-indexoptions

Description

The verify-index command can be used to check the consistency between the index
and entry data within the directory server database. This command also provides information
about the number of index keys that have reached the index entry limit.

The command checks the following information:

All entries are properly indexed

All index data reference entries exist

Data matches the corresponding index data

At the present time, this command is only available for a directory server
back end that uses Oracle Berkeley DB Java Edition to store its
information. None of the other back end types currently available maintain on-disk indexes. Therefore,
there is no need to have any command that can verify index
consistency.

Directory administrators can use this command when the directory server is running or
stopped. Note, however, that using verify-index when the server is running impacts the
overall performance of the directory server as well as the command. For example,
on a very busy online server, the verify-index command could take significantly
longer to process compared to running the command on an offline, or stopped,
directory server.

To use this command, the --baseDN option must be used to specify the
base DN of the back end below which to perform the validation.

Options

The verify-index command accepts an option in either its short form (for example,
-bbaseDN) or its long form equivalent (for example, --baseDNbaseDN).

Command Options

-b, --baseDNbaseDN

Specify the base DN for which to perform the verification. The provided value must be a base DN for a back end based on the Berkeley DB Java Edition. This is a required option, and only one base DN may be provided.

-c, --clean

Verify that an index is “clean”, which means that all of the entry IDs in all of the index keys refer to entries that actually exist and match the criteria for that index key. If this option is provided, then exactly one index should be specified using the --index option. If this option is not given, then the verification process will clean the id2entry database (which is a mapping of each entry ID to the actual data for that entry) and ensure that all of the entry contents are properly indexed.

--countErrors

Count the number of errors found during the verification and return that value as the exit code. Values greater than 255 will be returned as 255 due to exit code restrictions.

-i, --indexindex

Specify the name of an index for which to perform the verification. If the --clean option is provided, then this argument must be provided exactly once. Otherwise, it may be specified zero or more times. If the option is not provided, then all indexes will be checked. For an attribute index, the index name should be the name of the attribute, and an index must be configured for that attribute in the associated back end. You can also specify the following internal indexes, which are used internally on the server:

dn2id

A mapping of entry DNs to their corresponding entry IDs.

id2children

A mapping of the entry ID for an entry to the entry IDs of its immediate children.

id2subtree

A mapping of the entry ID for an entry to the entry IDs of all of its subordinates.

General Options

-?, -H, --help

Display command-line usage information for the command and exit without making any attempt to stop or restart the server.

-V, --version

Display the version information for the directory server and exit rather than attempting to run this command.

The following command verifies that the uid index (-i uid) under dc=example,dc=com (-b dc=example,dc=com) is “clean”
(-c). This “clean” option checks that each entry in the uid index maps
to an actual database entry with the uid attribute.