HP-UX Directory Server 8.1 configuration, command, and file reference

A Using the ns-slapd command-line utilities
Chapter 7 “Command-line scripts” discusses the scripts for performing routine administration
tasks on the HP-UX 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, HP 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
HP-UX Directory Server administrator guide.
A.2 Finding and executing the ns-slapd command-line utilities
The ns-slapd command-line utilities are stored in /opt/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/opt/dirsrv/slapd-instance_name. Either the -n or the -s option must be specified.
Options
Table A-1 db2ldif options
DescriptionOption
Defines the output file in which the server saves the exported LDIF. This file is stored by
default in the directory where the command-line utility resides.
-a outputFile
Specifies the debug level to use during the runtime of the db2ldif command. For further
information, refer to “nsslapd-errorlog-level (Error log level)”.
-d debugLevel
Specifies the location of the server configuration directory that contains the configuration
information for the export process. This must be the full path to the configuration directory,
/etc/opt/dirsrv/slapd-instance_name.
-D configDir
Decrypts an encrypted database during export. This option is used only if database
encryption is enabled.
-E
Sets minimal base-64 encoding.-m
Uses several files to store the output LDIF, with each instance stored in instance
filename, where filename is the file name specified in option -a.
-M
Specifies the name of the backend instance to be exported.
-n backendInstance
A.1 Overview of ns-slapd 243