![]() |
Configuration,
Command, and File Reference Netscape Directory Server |
| Previous |
Contents |
Index |
DocHome | Next |
In chapter 8, "Command-Line Scripts," we looked at the scripts for performing routine administration tasks on the Netscape Directory Server (Directory Server). In this appendix, we will look at the ns-slapd and slapd command-line utilities that can also be used to perform the same tasks.
This chapter contains the following sections:
The ns-slapd and slapd.exe command-line utilities all perform server administration tasks, and, while it can be argued that they allow a greater degree of flexibility for users, we still recommend that you use the command-line scripts presented in chapter 8, "Command-Line Scripts."
ns-slapd is used on a Unix operating system 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, see chapter 4, "Populating Directory Databases," in the Netscape Directory Server Administrator's Guide.
The ns-slapd command-line utilities are stored under:
Do not mistake
ns-slapd.exe, the slapd process watchdog, for slapd.exe
on Windows.
Exports the contents of the database to LDIF.
For slapd-serverID, the location of your server configuration directory, enter the full path. You must also specify either the -n or the -s option.
|
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. |
||
|
Specifies the debug level to use during the db2ldif runtime. For further information, see nsslapd-errorlog-level (Error Log Level). |
||
|
Specifies the location of the server configuration directory that contains the configuration information for the export process. You must specify the full path to the slapd-serverID directory. |
||
|
Specifies that 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. |
||
|
Causes the server to include the copiedFrom attribute and its contents in the LDIF output when importing the LDIF file to a consumer server. This information is required by the server by the replication process. If you use the -r option, you also need to specify the suffix you want to export by using the -s option. You must shut down the server before exporting using this option. |
||
|
Specifies the suffix or suffixes to include in the export. You may use multiple -s arguments. If you do not specify -s or -x, the server exports all suffixes within the database. If you use both -x and -s arguments with the same suffix, the -x operation takes precedence. Exclusion always takes precedence over inclusion. If you exclude one or more suffixes from the exported LDIF file and you intend to import the LDIF file into your configuration directory, do not exclude o=NetscapeRoot. If you use -s to specify a suffix to include and you intend to import the LDIF file into your configuration directory, make sure that you also use -s to include o=NetscapeRoot. |
||
|
Specifies that the uniqueID will not be included in the LDIF output. By default, the server includes the uniqueID for all entries with a uniqueID in the exported LDIF file. Only use this option if you intend to use the exported LDIF to initialize a 4.x consumer server.; otherwise, this option does not cause the server to create a uniqueID for entries but simply takes what already exists in the database. |
||
|
Outputs the contents of the database without wrapping lines. |
||
|
Specifies a suffix or suffixes to exclude in the export. You may use multiple -x arguments. If you do not specify -s or -x, the server exports all suffixes within the database. If you use both -x and -s options with the same suffix, the -x operation takes precedence. Exclusion always takes precedence over inclusion. If you intend to import the LDIF file into your configuration directory, do not exclude o=NetscapeRoot. |
||
Imports LDIF files to the database.
For configDir, which is the location of your server configuration directory, enter the full path. ldifFile is the name of the file containing the LDIF to be imported. You can find a demo LDIF file under the serverRoot/slapd-serverID/ldif directory. You must also specify either the -n or the -s option.
|
Specifies the debug level to use during runtime. For further information, see nsslapd-errorlog-level (Error Log Level). |
||
|
Specifies the location of the server configuration directory that contains the configuration information for the import process. You must specify the full path to the slapd-serverID directory. |
||
|
Generation of 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. If you use the deterministic generation to have a name-based unique ID, you can also specify the namespace you want the server to use as follows: where namespace_id is a string of characters in the following format: 00-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx Use this option if you want to import the same LDIF file into two different directory servers and you want the contents of both directories to have the same set of unique IDs. If unique IDs already exist in the LDIF file you are importing, then the existing IDs are imported to the server, regardless of the options you have specified. |
||
|
Specifies the LDIF file to be imported. This option is required. You can use multiple -i arguments to import more than one LDIF file at a time. When you import multiple files, the server imports the LDIF files in the order in which you specify them from the command-line. |
||
|
Specifies that no attribute indexes are created for the imported database. If you specify this option and you want to restore the indexes later, you will need to recreate the indexes by hand. See the Netscape Directory Server Administrator's Guide for further information. |
||
|
Specifies the suffix or suffixes within the LDIF file you want to import. If you use -s to specify a suffix to include and you are importing the LDIF file into your configuration directory, make sure that you also use -s to include o=NetscapeRoot. You can use multiple -s arguments. If you use both -x and -s with the same suffix, -x takes precedence. Exclusion always takes precedence over inclusion. If you do not specify -x or -s, then all available suffixes will be imported from the LDIF file. |
||
|
Allows you to specify suffixes within the LDIF file to exclude during the import. You can use multiple -x arguments. This option lets you selectively import portions of the LDIF file. If you use both -x and -s with the same suffix, -x takes precedence. Exclusion always takes precedence over inclusion. If you do not specify -x or -s, then all available suffixes will be imported from the LDIF file. If you are importing the LDIF file into your configuration directory, do not exclude o=NetscapeRoot. |
Creates and regenerates indexes.
|
Specifies the debug level to use during index creation. For further information, see nsslapd-errorlog-level (Error Log Level). |
||
|
Specifies the location of the server configuration directory that contains the configuration information for the index creation process. You must specify the full path to the slapd- serverID directory. |
||
|
Specifies the name of the backend containing the entries to index. |
||
|
Specifies the attribute to be indexed as well as the types of indexes to create and matching rules to apply (if any). If you want to specify a matching rule, you must specify an index type. You cannot use this option with option -T. indexTypes specifies a comma-separated list of indexes to be created for the attributes. matchingRules is an optional, comma-separated list of the OIDs for the languages in which you want the attribute to be indexed. This option is used to created international indexes. For information on supported locales and collation order OIDs, see Appendix D, "Internationalization," in the Netscape Directory Server Administrator's Guide. |
||
|
Specifies the VLV tag to use to create VLV indexes. You can use the console to specify VLV tags for each database supporting your directory tree, as described in xref. You can define additional VLV tags by creating them in LDIF and adding them in the Directory Server configuration, as described in xref. You cannot use this option with option -t. |
| Previous |
Contents |
Index |
DocHome | Next |