Chapter 7. command-line scripts, Finding and executing command-line scripts, Command-line scripts quick reference – Red Hat 8.1 User Manual

Page 207

Advertising
background image

Chapter 7. Command-Line Scripts

This chapter provides information on the scripts for managing Red Hat Directory Server, such as
backing-up and restoring the database. Scripts are a shortcut way of executing the ns-slapd interface
commands that are documented in

Appendix A, Using the ns-slapd Command-Line Utilities

.

7.1. Finding and Executing Command-Line Scripts

Most Directory Server-related scripts are located in the /usr/lib/dirsrv/slapd-instance_name
directory for Red Hat Enterprise Linux 5 (32-bit) (and in /usr/lib64/dirsrv/slapd-instance_name
on Red Hat Enterprise Linux 64-bit systems). A few are located in the /usr/bin directory. The exact
locations are listed in

Section 7.2, “Command-Line Scripts Quick Reference”

.

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

7.2. Command-Line Scripts Quick Reference

The following shell and Perl scripts are located in either the
/usr/lib/dirsrv/slapd-instance_name (for 32-bit Red Hat Enterprise Linux) or
/usr/lib64 /dirsrv/slapd-instance_name (for 64-bit Red Hat Enterprise Linux) directory.

Table 7.1. Shell Scripts in /usr/lib/dirsrv/slapd-instance_name or
/usr/lib64 /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-
slapd
command-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/lib/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.

Red Hat Directory Server 8.1 Configuration and Command Reference

207

Advertising