7 Command-line scripts

This chapter provides information on the scripts for managing the HP-UX Directory Server, such as backing-up and restoring the database. Scripts are a shortcut way of executing the ns-slapdinterface commands that are documented in Appendix A “Using the ns-slapdcommand-line utilities”.

7.1 Finding and executing command-line scripts

Most scripts are located in the /opt/dirsrv/slapd-instance_namedirectory, though a few are located in the /opt/dirsrv/bin directory. The exact locations are listed in “Command-line scripts quick reference”.

When scripts request either a directory name or a file name, always provide the absolute path. The scripts assume the dse.ldif file is located in the /etc/opt/dirsrv/slapd-instance_namedirectory.

7.2 Command-line scripts quick reference

The following shell and Perl scripts are located in the /opt/dirsrv/slapd-instance_namedirectory.

Table 7-1 Shell scripts in /opt/dirsrv/slapd-instance_name

Shell script

Description

bak2db

Restores the database from the most recent archived backup.

db2bak

Creates a backup of the current database contents.

db2ldif

Exports the contents of the database to LDIF.

db2index

Reindexes the database index files.

dbverify

Checks backend database files.

ldif2db

Imports LDIF files to the database. Runs the ns-slapdcommand-line utility with the

 

ldif2db keyword.

ldif2ldap

Performs an import operation over LDAP to the Directory Server.

monitor

Retrieves performance monitoring information using the ldapsearch command-line utility.

restart-slapd

Restarts Directory Server.

restoreconfig

Restores by default the most recently saved Administration Server configuration to

 

NetscapeRoot partition.

saveconfig

Saves Administration Server configuration stored in the NetscapeRoot database to the

 

/var/opt/dirsrv/slapd-instance_name/bak directory.

start-slapd

Starts Directory Server.

stop-slapd

Stops Directory Server.

suffix2instance

Maps a suffix to a backend name.

verify-db.pl

Checks backend database files.

vlvindex

Creates and generates virtual list view (VLV) indexes.

7.1 Finding and executing command-line scripts 215

Page 215
Image 215
HP UX Identity Security Software manual Finding and executing command-line scripts, Command-line scripts quick reference