Db2index (reindexes database index files), Syntax, Usage – Red Hat 8.1 User Manual

Page 211: Options

Advertising
background image

Either the -n or the -s option must be specified. By default, the output LDIF will be stored in one file. To
specify the use of several files, use the option -M.

Table 7.6. db2ldif Options

Option

Description

-1

Deletes, for reasons of backward compatibility,
the first line of the LDIF file which gives the
version of the LDIF standard.

-a outputFile

Gives the name of the output LDIF file.

-C

Uses only the main database file.

-E

Decrypts encrypted data during export. This
option is used only if database encryption is
enabled.

-m

Sets minimal base-64 encoding.

-M

Uses multiple files for storing the output LDIF, with
each instance stored in instance filename (where
filename is the filename specified for -a option).

-n backendInstance

Gives the instance to be exported.

-N

Specifies that the entry IDs are not to be included
in the LDIF output. The entry IDs are necessary
only if the db2ldif output is to be used as input
to db2index.

-r

Exports the information required to initialize a
replica when the LDIF is imported. Using this
option requires that the server be stopped first,
then run the db2ldif command.
The LDIF file which is created with db2ldif can
be imported using ldif2db. When it is imported,
if the -r option was used, than the database is
automatically initialized as a replica.

See

Section 7.3.8, “ldif2db (Import)”

for information

on importing an LDIF file.

-s suffix_name

Names the suffixes to be included or the
subtrees to be included if -n has been used.

-u

Requests that the unique ID is not exported.

-U

Requests that the output LDIF is not folded.

-x suffix_name

Names the suffixes to be excluded.

7.3.5. db2index (Reindexes Database Index Files)

Reindexes the database index files. Ellipses indicate that multiple occurrences are allowed.

For information on the equivalent Perl script, see

Section 7.4.4, “db2index.pl (Creates and Generates

Indexes)”

.

Syntax

db2index [[ -n backendInstance ] | [ -s includeSuffix ]] [ -t
[attributeName{:indextypes(:mathingrules)}] ] [ -T vlvAttribute ]

Usage

Here are a few sample commands:

Reindex all the database index files:

db2index

Reindex cn and givenname in the database instance userRoot:

db2index -n userRoot -t cn -t givenname

Reindex cn in the database where the root suffix is dc=example,dc=com:

db2index -s "dc=example,dc=com" -t cn

Red Hat Directory Server 8.1 Configuration and Command Reference

211

Advertising