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-slapdcommand-line utilities that can be used to perform the same tasks.

The ns-slapdcommand-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-slapdis 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-slapdcommand-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 -DconfigDir -aoutputFile [ -ddebugLevel] [ -nbackendInstance ] [ -r] [ -sincludeSuffix] [ -xexcludeSuffix] [ -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 -nor the -soption must be specified.

Options

Table A-1 db2ldif options

Option

Description

-aoutputFile

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.

-ddebugLevel

Specifies the debug level to use during the runtime of the db2ldif command. 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 export process. This must be the full 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.

-m

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.

-n backendInstance Specifies the name of the backend instance to be exported.

A.1 Overview of ns-slapd 243

Page 243
Image 243
HP UX Identity Security Software manual Overview of ns-slapd, Finding and executing the ns-slapd command-line utilities