9.3. Shell Scripts

This section covers the following scripts:
Some of the shell scripts can be executed while the server is running. For others, the server must be stopped. The description of each script below indicates whether the server must be stopped or if it can continue to run while executing the script.
When a shell script has a Perl equivalent, there is a cross-reference to the section describing the equivalent Perl script.

9.3.1. bak2db (Restores a Database from Backup)

Restores the database from the most recent archived backup. To run this script, the server must be stopped.
Syntax

 

bak2db backupDirectory -n backend

Options

 

Table 9.4. bak2db Options

Option Description
backupDirectory Gives the backup directory path.
-n backendInstance Optional. Specifies the back end name, such as userRoot, which is being restored. This option is only used for filesystem replica initialization or to restore a single database; it is not necessary to use the n option to restore the entire directory.
For information on the equivalent Perl script, see Section 9.4.1, “bak2db.pl (Restores a Database from Backup)”. For more information on restoring databases, see the "Populating Directory Databases" chapter in the Red Hat Directory Server Administrator's Guide. For more information on using filesystem replica initialization, see the "Managing Replication" chapter in the Red Hat Directory Server Administrator's Guide.

9.3.2. cl-dump (Dumps and Decodes the Changelog)

Troubleshoots replication-related problems. cl-dump is a shell script wrapper of cl-dump.pl to set the appropriate library path.
Syntax

cl-dump -h host -p port -D bindDn [ -w bindPassword | -P bindCert ] -r replicaRoots -o outputFile [ -c ] [ -v ]

cl-dump [ -i changelogFile ] [ -o outputFile ] [ -c ]

Options

Without the -i option, the script must be run when the Directory Server is running from a location from which the server's changelog directory is accessible.

Table 9.5. cl-dump Options

Option Description
-c Dumps and interprets CSN only. This option can be used with or without the -i option.
-D bindDn Specifies the Directory Server's bind DN. Defaults to cn=Directory Manager if the option is omitted.
-h host Specifies the Directory Server's host. This defaults to the server where the script is running.
-i changelogFile Specifies the path to the changelog file. If there is a changelog file and if certain changes in that file are base-64 encoded, use this option to decode that changelog.
-o outputFile Specifies the path, including the filename, for the final result. Defaults to STDOUT if omitted.
-p port Specifies the Directory Server's port. The default value is 389.
-P bindCert Specifies the path, including the filename, to the certificate database that contains the certificate used for binding.
-r replicaRoots Specifies the replica-roots whose changelog to dump. When specifying multiple roots, use commas to separate roots. If the option is omitted, all the replica roots will be dumped.
-v Prints the version of the script.
-w bindPassword Specifies the password for the bind DN.
For information on the equivalent Perl script, see Section 9.4.2, “cl-dump.pl (Dumps and Decodes the Changelog)”.

9.3.3. cleanallruv.pl (Cleans RUV data)

The cleanallruv.pl Perl script creates and adds a cleanAllRUV task to the Directory Server. Additionally, the script is able to abort currently running cleanAllRUV tasks.
Syntax

cleanallruv.pl [ -D root_DN ] [ -w bind_password | -w - | -j file_name ] [ -b base_DN ] [ -r replica_ID ] [ -A ] [ -h ]

Table 9.6. cleanallruv.pl command options

Option Description
-D root_DN Specifies the distinguished name (DN) used to bind to Directory Server. This is usually the cn=Directory Manager or root DN account. If you do not set this parameter, the script searches the Directory Server instance configuration for the value.
-w password Sets the password for the bind DN.
-w - Prompts for the bind DN's password.
-j file_name Reads the password for the bind DN account from the file passed to the parameter.
-b base_DN Sets the suffix of the replica that is cleaned up.
-r replica_ID Sets the replica ID to remove.
-A Abort a cleanAllRUV task that is currently running.
-h Displays the usage information of the script.

9.3.4. db2bak (Creates a Backup of a Database)

Creates a backup of the current database contents. This script can be executed while the server is running or stopped.

Important

If the database being backed up is a master database, meaning it keeps a changelog, then it must be backed up using the db2bak.pl Perl script or using the Directory Server Console if the server is kept running. The changelog only writes its RUV entries to the database when the server is shut down; while the server is running, the changelog keeps its changes in memory. For the Perl script and the Console, these changelog RUVs are written to the database before the backup process runs. However, that step is not performed by the command-line script.
The db2bak should not be run on a running master server. Either use the Perl script or stop the server before performing the backup.
Syntax

 

db2bak [ backupDirectory ]

For information on the equivalent Perl script, see Section 9.4.3, “db2bak.pl (Creates a Backup of a Database)”.

9.3.5. db2ldif (Exports Database Contents to LDIF)

Exports the contents of the database to LDIF. This script can be executed while the server is still running, except with the -r option. To export the replication state information, shut down the server first, then run db2ldif with -r.

Note

db2ldif uses the entryrdn index to order the parent-child entries when it exports the database; this enables the exported LDIF file to be used for import, since the proper hierarchy of parent and child entries is preserved. If the entryrdn index is unavailable for some reason, then db2ldif uses the parentid key for each entry to identify the parent and export it before the child entry. This second method allows the export operation to succeed, but the operation may take a long time to complete.
For information on the equivalent Perl script, see Section 9.4.5, “db2ldif.pl (Exports Database Contents to LDIF)”.
For the shell scripts, the script runs the ns-slapd command-line utility with the db2ldif keyword. Ellipses (...) indicate that multiple occurrences are allowed.
Syntax

 

db2ldif [[ -n backendInstance ] | [ -s includeSuffix ]] [ [ -x excludeSuffix ] ] [ -r ] [ -C ] [ -u ] [ -U ] [ -m ] [ M ] [ -a outputFile ] [ -1 ] [ -N ] [ -E ]

Options

Either the -n or the -s option must be specified. By default, the output LDIF will be stored in one file. To specify the use of several files, use the option -M.

Table 9.7. db2ldif Options

Option Description
-1 Deletes, for reasons of backward compatibility, the first line of the LDIF file which gives the version of the LDIF standard.
-a outputFile Gives the name of the output LDIF file.
-C Uses only the main database file.
-E Decrypts encrypted data during export. This option is used only if database encryption is enabled.
-m Sets minimal base-64 encoding.
-M Uses multiple files for storing the output LDIF, with each instance stored in instance filename (where filename is the filename specified for -a option).
-n backendInstance Gives the instance to be exported.
-N Specifies that the entry IDs are not to be included in the LDIF output. The entry IDs are necessary only if the db2ldif output is to be used as input to db2index.
-r
Exports the information required to initialize a replica when the LDIF is imported. Using this option requires that the server be stopped first, then run the db2ldif command.
The LDIF file which is created with db2ldif can be imported using ldif2db. When it is imported, if the -r option was used, than the database is automatically initialized as a replica.
See Section 9.3.10, “ldif2db (Import)” for information on importing an LDIF file.
-s suffix_name Names the suffixes to be included or the subtrees to be included if -n has been used.
-u Requests that the unique ID is not exported.
-U Requests that the output LDIF is not folded.
-x suffix_name Names the suffixes to be excluded.

9.3.6. db2index (Reindexes Database Index Files)

Reindexes the database index files. Ellipses indicate that multiple occurrences are allowed.

Note

db2index uses the entryrdn index to order the parent-child entries when it indexes the database to preserve the proper hierarchy of parent and child entries. If the entryrdn index is unavailable for some reason, then db2index uses the parentid key for each entry to identify the parent. This second method allows the index operation to succeed, but the operation may take a long time to complete.
For information on the equivalent Perl script, see Section 9.4.4, “db2index.pl (Creates and Generates Indexes)”.
Syntax

db2index [[ -n backendInstance ] | [ -s includeSuffix ]] [ -t [attributeName{:indextypes(:mathingrules)}] ] [ -T vlvAttribute ]

Usage

Here are a few sample commands:

  • Reindex all the database index files:
    db2index
  • Reindex cn and givenname in the database instance userRoot:
    db2index -n userRoot -t cn -t givenname
  • Reindex cn in the database where the root suffix is dc=example,dc=com:
    db2index -s "dc=example,dc=com" -t cn
Options

 

Table 9.8. db2index Options

Option Description
-n backendInstance Gives the name of the instance to be reindexed.
-s includeSuffix Gives suffixes to be included or the subtrees to be included if -n has been used.
-t attributeName{:indextypes(:mathingrules)} Names of the attributes to be reindexed. Optionally, this can include the index type (eq, pres, sub, approx) and a matching rule OID.
-T vlvAttributeName Gives the names of the VLV attributes to be reindexed. The name is the VLV index object's common name in cn=config.

9.3.7. dbmon.sh (Database Monitoring and Entry Cache Usage)

The dbmon.sh script enables you to monitor the Directory Server database and entry cache usage. You can use the values the script displays to tune the database, entry and DN cache.
When running, dbmon.sh continuously returns database information until you terminate the script by pressing the Ctrl+C keyboard shortcut.

Syntax

[ INCR=seconds ] [ HOST=host_name ] [ PORT=port_number ] [ BINDDN=bind_DN ] [ BINDPW=bind_password ] [ DBLIST=databases ] [ INDEXLIST=indexes ] [ VERBOSE=level ] dbmon.sh

Options

The dbmon.sh script does not take any command-line options. You can specify additional options by using environment variables. For example:
HOST=server.example.com BINDPW=password dbmon.sh
Option Parameter Description
INCR seconds Returns output every period set in this option. Default: 1 second
HOST host_name Host name or IP address. Default: localhost
PORT port_number Port number. Default: 389
BINDDN bind_DN DN used to bind to the directory. The account specified must have read permissions for the cn=config entry and sub entries. Default: cn=Directory Manager
BINDPW bind_password Password for the bind DN. Default: secret
DBLIST databases Space-separated list of databases to check. Enter the list in quotes or escape spaces. Default: all databases
INDEXLIST indexes Space-separated list of indexes to show for every database. Enter the list in quotes or escape spaces. To display all indexes, set the parameter to all. Default: none
VERBOSE level
Sets the output level. Default: 0
Available values:
  • 0: Standard output that is suitable for parsing by a script.
  • 1: In addition, show column headings.
  • 2: In addition, show column headings and detailed description of the data.

9.3.8. dbverify (Checks for Corrupt Databases)

Verifies the back end database files. If the server crashes because of a corrupted database, this command can be used to verify the integrity of the different database files to help isolate any problems.

Important

Never run dbverify when a modify operation is in progress. This command calls the BerkeleyDB utility db_verify and does not perform any locking. This can lead to data corruption if the script is run at the same time as a modify. If that occurs, an entry will be recorded in the error log:
DB ERROR: db_verify: Page 3527: out-of-order key at entry 42
DB ERROR: db_verify: DB->verify: db/mstest2/uid.db4: DB_VERIFY_BAD: Database
verification failed
Secondary index file uid.db4 in db/mstest2 is corrupted.
Please run db2index(.pl) for reindexing.
Run db2index -t uid to avoid rebuilding all of the indexes or export and reimport all of the databases using db2ldif and ldif2db.
dbverify is a shell script wrapper of verify-db.pl to set the appropriate library path.
Syntax

dbverify [ -a /path/to/database_directory ]

Options

 

Table 9.9. dbverify Options

Option Description
-a path Gives the path to the database directory. If this option is not passed with the verify-db.pl command, then it uses the default database directory, /var/lib/dirsrv/slapd-instance_name/db.
For information on the equivalent Perl script, see Section 9.4.25, “verify-db.pl (Check for Corrupt Databases)”.

9.3.9. ds_removal

The ds_removal tool removes a single instance of Directory Server. The server instance usually must be running when this script is run so that the script can bind to the instance. It is also possible to force the script to run, which may be necessary if there was an interrupted installation process or the instance is corrupted or broken so that it cannot run.
When the instance is removed, it is shutdown and all of its configuration files are removed. Certificate database files, like cert8.db and key3.db, are not removed, so the remaining instance directory is renamed removed.slapd-instance.
Syntax

ds_removal [ -f ] -s instance_name -w manager_password

Options

 

Option Parameter Description
-f Forces the removal of the instance. This can be useful if the instance is not running but must be removed anyway.
-s instance_name The name of the instance to remove.
-w manager_password The Directory Manager password to use to bind to the instance.

9.3.10. ldif2db (Import)

Runs the ns-slapd command-line utility with the ldif2db keyword. To run this script, the server must be stopped. Ellipses indicate that multiple occurrences are allowed.
For information on the equivalent Perl script, see Section 9.4.8, “ldif2db.pl (Import)”.

Note

ldif2db supports LDIF version 1 specifications. An attribute can also be loaded using the :< URL specifier notation; for example:
jpegphoto:< file:///tmp/myphoto.jpg
Although the official notation requires three ///, the use of one / is accepted. For further information on the LDIF format, see the "Managing Directory Entries" chapter in the Red Hat Directory Server Administrator's Guide.
Syntax

ldif2db [[ -n backendInstance ] | [ [ -s includeSuffix ] ...]] [ -x excludeSuffix ] [ [ -i ldifFile ] ] [ -O ] [ -g string ] [ -G namespaceId ] [ -E ]

Options

 

Table 9.10. ldif2db Options

Option Description
-c Merges chunk size.
-E Encrypts data during import. This option is used only if database encryption is enabled.
-g string
Generates a unique ID. Type none for no unique ID to be generated and deterministic for the generated unique ID to be name-based.
By default, a time-based unique ID is generated. When using the deterministic generation to have a name-based unique ID, it is also possible to specify the namespace for the server to use, as follows:
-g deterministic namespace_id
namespace_id is a string of characters in the format 00-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx.
Use this option to import the same LDIF file into two different Directory Servers and the contents of both directories should have the same set of unique IDs. If unique IDs already exist in the LDIF file being imported, then the existing IDs are imported to the server, regardless of the options specified.
-G namespaceId Generates a namespace ID as a name-based unique ID. This is the same as specifying the -g deterministic option.
-i ldifFile Gives the names of the input LDIF files. When multiple files are imported, they are imported in the order they are specified on the command line.
-n backendInstance Gives the instance to be imported. Ensure that the specified instance corresponds to the suffix contained by the LDIF file; otherwise, the data contained by the database is deleted, and the import fails.
-O Requests that only the core database is created, without attribute indexes.
-s includeSuffix Gives the suffixes to be included or to specify the subtrees to be included if -n has been used.
-x excludeSuffix Gives the suffixes to be excluded.

9.3.11. ldif2ldap (Performs Import Operation over LDAP)

Performs an import operation over LDAP to the Directory Server. To run this script, the server must be running.
Syntax

ldif2ldap [ -D rootdn ] [ -w password ] [ -f filename ]

Options

Table 9.11. ldif2ldap Options

Option Description
-D rootdn Gives a user DN with root permissions, such as Directory Manager.
-f filename Gives the name of the file to be imported. When importing multiple files, the files are imported in the order they are specified on the command line.
-w password Gives the password associated with the user DN.

9.3.12. monitor (Retrieves Monitoring Information)

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

monitor

monitor Options

There are no options for this script.

9.3.13. repl-monitor (Monitors Replication Status)

Shows in-progress status of replication. repl-monitor is a shell script wrapper of repl-monitor.pl to set the appropriate library path.
For more information on the Perl script, see Section 9.4.19, “repl-monitor.pl (Monitors Replication Status)”.
Syntax

repl-monitor [ -h host ] [ -p port ] [ -f configFile ] [ -u refreshUrl ] [ -t refreshInterval ] [ -r ] [ -v ]

Options

Table 9.12. repl-monitor Options

Option Description
-h host Specifies the initial replication supplier's host. The default value is the current host name.
-f configFile Specifies the absolute path to the configuration file, which defines the connection parameters used to connect to LDAP servers to get replication information. For more information about the configuration file, see Configuration File Format.
-p port Specifies the initial replication supplier's port. The default value is 389.
-r If specified, causes the routine to be entered without printing the HTML header information. This is suitable when making multiple calls to this routine — such as specifying multiple, different, unrelated supplier servers — and expecting a single HTML output.
-t refreshInterval Specifies the refresh interval in seconds. The default value is 300 seconds. This option must be used with the -u option.
-u refreshUrl Specifies the refresh URL. The output HTML file may invoke a CGI program periodically. If this CGI program in turn calls this script, the effect is that the output HTML file would automatically refresh itself. This is useful for continuous monitoring. See also the -t option. The script has been integrated into Red Hat Administration Express, so that the replication status can be monitored through a web browser.
-v Prints the version of this script.

Configuration File Format

The configuration file defines the following:

  • The connection parameters for connecting to the LDAP servers to get replication information; specifying this information is mandatory.
  • The server alias for more readable server names; specifying this information is optional.
  • The color thresholds for time lags; specifying this information is optional.
The format for the configuration file is shown below.
[connection]
host:port:binddn:bindpwd:bindcert
host:port:binddn:bindpwd:bindcert
...

[alias]
alias = host:port
alias = host:port
...

[color]
lowmark = color
lowmark = color
The connection section defines how this tool may connect to each LDAP server in the replication topology to get the replication-agreement information. The default binddn is cn=Directory Manager. Simple bind will be used unless bindcert is specified with the path of a certificate database.
A server may have a dedicated or shared entry in the connection section. The script will find out the most matched entry for a given server. For example, if all the LDAP servers except host1 share the same binddn and bindpassword, the connection section will need to contain just two entries:
[connection]
*:*:binddn:bindpassword:
host1:*:binddn1:bindpassword1:
In the optional alias section, use aliases such as Supplier1, Supplier2, and Hub1, to identify the servers in the replication topology. If used, the output shows these aliases, instead of http(s)://hostname:port.
The CSN time lags between suppliers and consumers can be displayed in different colors based on their range. The default color set is green for 0-5 minutes lag, yellow for 5-60 minutes lag, and pink for a lag of 60 minutes or more.
The connection parameters for all the servers in a replication topology must be specified within one configuration file. One configuration file, however, may contain information for multiple replication topologies.
Because of the connection parameters, the replication monitoring tool does not need to perform DES decryption of the credentials stored in the Directory Server. Each line in this file could either be a comment started with the # character or a connection entry of the format:
host:port:binddn:bindpwd:bindcert
  • host, port, and binddn can be replaced with relevant values or *, or omitted altogether. If host is null or *, the entry may apply to any host that does not have a dedicated entry in the file. If port is null or *, the port will default to the port stored in the current replication agreement. If binddn is null or *, it defaults to cn=Directory Manager.
  • bindcert can be replaced with the full path to the certificate database, null, or *. If bindcert is omitted or replaced with *, the connection will be a simple bind.
For example, the configuration file may appear as follows:
#Configuration File for Monitoring Replication Via Admin Express
[connection]
*:*:*:mypassword

[alias]
M1 = host1.example.com:10011
C1 = host4.example.com:10021
C2 = host2.example.com:10022

[color]
0 = #ccffcc
5 = #FFFFCC
60 = #FFCCCC
A shadow port can be set in the replication monitor configuration file. For example:
host:port=shadowport:binddn:bindpwd:bindcert
When the replication monitor finds a replication agreement that uses the specified port, it will use the shadow port to connect to retrieve statistics.

9.3.14. pwdhash (Prints Encrypted Passwords)

Prints the encrypted form of a password using one of the server's encryption algorithms. If a user cannot log in, use this script to compare the user's password to the password stored in the directory.
Syntax

pwdhash [ -D config_directory ] [ -H ] [[ -s scheme ] | [ -c comparepwd ]] [ password ]

Options

Table 9.13. pwdhash Options

Option Description
-D config_directory Gives the full path to the configuration directory.
-c password Gives the hashed password string to which to compare the user's password.
-s scheme Gives the scheme to hash the given password.
-H Shows the help.

For more information on the different storage schemes, such as SSHA, SHA, CRYPT, and CLEAR, see the Directory Server Administrator's Guide.

9.3.15. restart-dirsrv (Restarts the Directory Server)

Restarts either all instances of the Directory Server or a specific Directory Server instance.
Syntax

restart-dirsrv [instance_name]

Options

Option Description
instance_name A name of a specific Directory Server instance to restart. If the instance name isn't given, then all local Directory Server instances are restarted.

Exit Status Codes

Exit Code Description
0 Server restarted successfully.
1 Server could not be started.
2 Server restarted successfully but was already stopped.
3 Server could not be stopped.

9.3.16. restart-ds-admin (Restarts the Admin Server)

Restarts the Admin Server instance.
Syntax

restart-ds-admin

Options

There are no options for this script.

9.3.17. restart-slapd (Restarts the Directory Server)

Restarts the Directory Server.
This script is a wrapper for restart-dirsrv and automatically supplies the instance name to the restart-dirsrv script.
Syntax

restart-slapd

Options

There are no options for this script.

Exit Status

Table 9.14. restart-slapd Exit Status Codes

Exit Code Description
0 Server restarted successfully.
1 Server could not be started.
2 Server restarted successfully but was already stopped.
3 Server could not be stopped.

9.3.18. restoreconfig (Restores Admin Server Configuration)

Restores, by default, the most recently saved Admin Server configuration information to the NetscapeRoot partition under the /etc/dirsrv/slapd-instance_name/ directory.
To restore the Admin Server configuration, do the following:
  1. Stop the Directory Server.
  2. Run the restoreconfig script.
  3. Restart the Directory Server.
  4. Restart the Admin Server for the changes to be taken into account.
Syntax

restoreconfig

Options

There are no options for this script.

9.3.19. saveconfig (Saves Admin Server Configuration)

Saves Admin Server configuration information to /var/lib/dirsrv/slapd-instance_name/bak directory.
This script will only run if the server is running.
Syntax

saveconfig

Options

There are no options for this script.

9.3.20. start-dirsrv (Starts the Directory Server)

Starts either all instances of the Directory Server or a specific Directory Server instance.
It's a good idea to check whether the server has been effectively started using the ps command because it could sometimes be that the script returned a message while the startup process was still on-going, resulting in a confusing message.
Syntax

start-dirsrv [instance_name]

Options

Option Description
instance_name A name of a specific Directory Server instance to start. If the instance name isn't given, then all local Directory Server instances are started.

Exit Status Codes

Exit Code Description
0 Server started successfully.
1 Server could not be started.
2 Server was already running.

9.3.21. start-ds-admin (Starts the Admin Server)

Starts the Admin Server instance.
Syntax

start-ds-admin

Options

There are no options for this script.

9.3.22. start-slapd (Starts the Directory Server)

Starts the Directory Server. It's a good idea to check whether the server has been effectively started using the ps command because it could sometimes be that the script returned a message while the startup process was still on-going, resulting in a confusing message.
This script is a wrapper for start-dirsrv and automatically supplies the instance name to the start-dirsrv script.
Syntax

start-slapd

Options

There are no options for this script.

Exit Status Codes

Table 9.15. start-slapd Exit Status Codes

Exit Code Description
0 Server started successfully.
1 Server could not be started.
2 Server was already started.

9.3.23. stop-dirsrv (Stops the Directory Server)

Stops either all instances of the Directory Server or a specific Directory Server instance.
It's a good idea to check whether the server has been effectively stopped using the ps command because it could sometimes be that the script returned a success message while the shutdown process was still on-going, resulting in a confusing message.
Syntax

stop-dirsrv [instance_name]

Options

Option Description
instance_name A name of a specific Directory Server instance to stop. If the instance name isn't given, then all local Directory Server instances are stopped.

Exit Status Codes

Exit Code Description
0 Server stopped successfully.
1 Server could not be stopped.
2 Server was already stopped.

9.3.24. stop-ds-admin (Stops the Admin Server)

Stops the Admin Server instance.
Syntax

stop-ds-admin

Options

There are no options for this script.

9.3.25. stop-slapd (Stops the Directory Server)

Stops the Directory Server. It's a good idea to check whether the server has been effectively stopped using the ps command because it could sometimes be that the script returned a message while the shutdown process was still on-going, resulting in a confusing message.
This script is a wrapper for stop-dirsrv and automatically supplies the instance name to the stop-dirsrv script.
Syntax

stop-slapd

Options

There are no options for this script.

Exit Status

Table 9.16. stop-slapd Exit Status Codes

Exit Code Description
0 Server stopped successfully.
1 Server could not be stopped.
2 Server was already stopped.

9.3.26. suffix2instance (Maps a Suffix to a Backend Name)

Maps a suffix to a back end name.
Syntax

suffix2instance [ -s suffix ]

Options

Table 9.17. suffix2instance Options

Option Description
-s Suffix to be mapped to the back end.

9.3.27. upgradednformat

Updates older-style DN syntaxes to RFC 4514-style DN syntaxes for migrated databases.

Note

This script is run automatically by setup-ds-admin.pl -u when a Directory Server instance is upgraded. It is not likely that this script will need to be run manually.
Syntax

upgradednformat [ -N ] -n backendInstance [ -a /path/to/database/directory ]

Options

Either the -N or both -n and -a must be specified.

Table 9.18. upgradednformat Options

Option Description
-a /path/to/database/directory Gives the full path to the database directory.
-N Checks whether any DNs in the database need to be updated.
-n backendInstance Gives the name of the database containing the entries to index.

9.3.28. vlvindex (Creates Virtual List View Indexes)

To run the vlvindex script, the server must be stopped. The vlvindex script creates virtual list view (VLV) indexes, known in the Directory Server Console as browsing indexes. VLV indexes introduce flexibility in the way search results are viewed. VLV indexes can organize search results alphabetically or in reverse alphabetical order, making it easy to scroll through the list of results. VLV index configuration must already exist prior to running this script.
Syntax

vlvindex [ -d debugLevel ] [ -n backendInstance ] | [ -s suffix ] [ -T vlvTag ]

Options

Either the -n or the -s option must be specified.

Table 9.19. vlvindex Options

Option Description
-d debugLevel Specifies the debug level to use during index creation. Debug levels are defined in Section 3.1.1.55, “nsslapd-errorlog-level (Error Log Level)”
-n backendInstance Gives the name of the database containing the entries to index.
-s suffix Gives the name of the suffix containing the entries to index.
-T vlvTag VLV index identifier to use to create VLV indexes. The Console can specify VLV index identifier for each database supporting the directory tree, as described in the Directory Server Administrator's Guide. Define additional VLV tags by creating them in LDIF and adding them to Directory Server's configuration, as described in the Red Hat Directory Server Administrator's Guide. Red Hat recommends using the DN of the entry for which to accelerate the search sorting.