Using the ns-slapd command-line utilities, A.1. overview of ns-slapd, Note – Red Hat 8.1 User Manual

Page 240: A.3. utilities for exporting databases: db2ldif, Syntax, Options

Advertising
background image

Using the ns-slapd Command-Line Utilities

Chapter 7, Command-Line Scripts

discussed the scripts for performing routine administration tasks on

the Red Hat Directory Server (Directory Server). This appendix discusses the ns-slapd command-line
utilities that can be used to perform the same tasks.

The ns-slapd command-line utilities all perform server administration tasks, and, while it can be argued
that they allow a greater degree of flexibility for users, Red Hat recommends using the command-line
scripts described in

Chapter 7, Command-Line Scripts

A.1. Overview of ns-slapd

ns-slapd is used to start the Directory Server process, to build a directory database from an LDIF file,
or to convert an existing database to an LDIF file. For more information on starting and stopping the
Directory Server, importing from LDIF using the command-line, and exporting to LDIF using the command-
line, refer to the "Populating Directory Databases" chapter in the Red Hat Directory Server
Administrator's Guide
.

A.2. Finding and Executing the ns-slapd Command-Line Utilities

The ns-slapd command-line utilities are stored in /etc/dirsrv/slapd-instance_name

NOTE

In order to execute the command-line utilities, set the library paths set in the command-line
scripts.

A.3. Utilities for Exporting Databases: db2ldif

Exports the contents of the database to LDIF.

Syntax

ns-slapd db2ldif -D configDir -a outputFile [ -d debugLevel ] [ -n backendInstance ] [ -r ] [ -
s includeSuffix ] [ -x excludeSuffix ] [ -N ] [ -u ] [ -U ] [ -m ] [ -M ] [ -E ]

With this command, enter the full path to the configuration directory,
/etc/dirsrv/slapd-instance_name. Either the -n or the -s option must be specified.

Options

24 0

Using the ns-slapd Command-Line Utilities

Advertising