Table A-1 db2ldif options (continued)

Option

Description

-N

Specifies that entry IDs are not to be included in the LDIF output. The entry IDs are necessary

 

only if the output of the db2ldif command is to be used as input to the db2index

 

command.

 

 

-r

Exports replication state information. The server must be shut down before exporting using

 

this option.

 

 

-sincludeSuffix

Specifies the suffix or suffixes to include in the export. There can be multiple -sarguments.

 

 

-u

Specifies that the uniqueID will not be included in the LDIF output. By default, the server

 

includes the uniqueID for all entries with a uniqueID in the exported LDIF file. Only use

 

this option to use the exported LDIF to initialize a 4.x consumer server; otherwise, this

 

option does not cause the server to create a uniqueID for entries but simply takes what

 

already exists in the database.

 

 

-U

Outputs the contents of the database without wrapping lines.

 

 

-xexcludeSuffix

Specifies a suffix or suffixes to exclude in the export. There can be multiple -xarguments.

 

If neither -sor -xis not specified, the server exports all suffixes within the database. When

 

using both -xand -soptions with the same suffix, the -xoperation takes precedence.

 

Exclusion always takes precedence over inclusion. If the LDIF file will be imported into the

 

configuration directory, do not exclude o=NetscapeRoot.

 

 

A.4 Utilities for restoring and backing up databases: ldif2db

Imports LDIF files to the database.

Syntax

ns-slapd ldif2db -DconfigDir -ildifFile [ -ddebugLevel ] [ -gstring ] [ -nbackendInstance ] [ -O] [ -sincludeSuffix ] [ -xexcludeSuffix] [ -E]

Enter the full path to the server configuration directory (configdir). ldifFile is the name of the file containing the LDIF to be imported. There is an example LDIF file under the /var/opt/dirsrv/slapd-instance_name/ldifdirectory. Either the -nor the -soption must be specified.

Options

Table A-2 ldif2db options

Option

Description

-ddebugLevel

Specifies the debug level to use during runtime. For further information, refer to

 

“nsslapd-errorlog-level (Error log level)”.

 

 

-DconfigDir

Specifies the location of the server configuration directory that contains the configuration

 

information for the import process. This must be the fulle path to the configuration directory,

 

/etc/opt/dirsrv/slapd-instance_name.

 

 

-E

Decrypts an encrypted database during export. This option is used only if database

 

encryption is enabled.

 

 

-gstring

Generates a unique ID. Type none for no unique ID to be generated and deterministic

 

for the generated unique ID to be name-based. By default, a time-based unique ID is

 

generated.

 

When using the deterministic generation to have a name-based unique ID, it is also

 

possible to specify the namespace for the server to use, as follows:

 

-g deterministic namespaceId

 

namespaceId is a string of characters in the format

 

00-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx.

 

Use this option to import the same LDIF file into two different Directory Servers and the

 

contents of both directories should have the same set of unique IDs. If unique IDs already

 

exist in the LDIF file being imported, then the existing IDs are imported to the server,

 

regardless of the options specified.

 

 

244 Using the ns-slapd command-line utilities