Red Hat Directory Server 8.0 Configuration, Command, and File Reference
Appendix A. 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
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.
2. Finding and Executing the ns-slapd Command-Line
Utilities
The ns-slapd command-line utilities are stored in /usr/lib/dirsrv/slapd-instance_name
NOTE
In order to execute the command-line utilities, set the library paths set in the
command-line scripts.
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.
277