Chapter 2
Command-Line Scripts
This chapter provides information on the scripts you can use to back up and restore your database. These scripts are a shortcut to executing the ns-slapd interface commands, documented in Appendix B "ns-slapd and slapd.exe Command-Line Utilities."
This chapter is divided into the following sections:
Command-Line Scripts Quick Reference
All scripts and commands, with the exception of admin_ip.pl and schema_push.pl, can be accessed in the following way:
|
Solaris Packages
|
Using the /usr/sbin/directoryserver name command
|
|
Other platforms
|
As the /ServerRoot/slapd-serverID/name script or .bat file
|
The admin_ip.pl script is located in the /ServerRoot/shared/bin folder. The schema_push.pl script is located in /ServerRoot/slapd-serverID/ and must be run from this location on all platforms.
Refer to the tables below for the name and purpose of each script.
When scripts request either a directory name or a file name, always provide the absolute path. The scripts assume that you want to use the dse.ldif file located in:
/ServerRoot/slapd-serverID/config
|
Caution
|
To execute the Perl Scripts, you must change to the directory in which the command-line utilities are stored. Although it is possible to set command-path and library-path variables to execute these scripts, this is not the recommended procedure. You run the risk of disrupting the correct execution of other scripts and utilities and of compromising the security of the system, particularly when you have more than one server version installed.
The same procedure applies to the ldapsearch, ldapmodify, ldapdelete, ldapcompare and ldif command-line utilities. For more information on these command-line utilities, see the Directory Server Resource Kit Tools Reference.
Note also that when you are running the Perl scripts on Windows machines, the path environment variable must contain the Perl executable (perl.exe) file. You must therefore run the scripts from the following directory on Windows:
\ServerRoot\bin\slapd\admin\bin
|
The following table lists command-line script names, which are also option names for the /usr/sbin/directoryserver command (Solaris packages.)
Table 2-1    Commonly Used Command-Line Shell and Batch Scripts
|
Command Name
|
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.
|
|
getpwenc
|
Prints the encrypted form of a password using one of the server's encryption algorithms. If a user cannot log in, you can use this script to compare the user's password to the password stored in the directory. This command name is not an option for the directoryserver command for Solaris packages.
|
|
ldif2db
|
Imports LDIF files to the database.
Runs the slapd (Windows) or ns-slapd (UNIX) command-line utility with the ldif2db keyword. By default, the script first saves and then merges any existing configuration tree (o=NetscapeRoot) with any files to be imported.
|
|
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. Use the following command on the Solaris Packages platform: /usr/sbin/directoryserver restart.
|
|
restoreconfig
|
Restores by default the most recently saved Admin Server configuration to NetscapeRoot partition.
|
|
saveconfig
|
Saves Admin Server configuration, stored in the NetscapeRoot suffix, to ServerRoot/slapd-serverID/confbak
|
|
start-slapd
|
Starts Directory Server. Use the following command on the Solaris Packages platform: /usr/sbin/directoryserver start.
|
|
stop-slapd
|
Stops Directory Server. Use the following command on the Solaris Packages platform: /usr/sbin/directoryserver stop.
|
|
suffix2instance
|
Maps a suffix to a backend name.
|
|
vlvindex
|
Creates and generates virtual list view (VLV) indexes, also called browsing indexes.
|
The following table gives the names of Perl scripts and the equivalent command for Solaris packages.
Table 2-2    Commonly Used Command-Line Perl Scripts
|
Perl Script
|
Description
|
|
admin_ip.pl
|
Changes the IP address in the local Administration Server configuration file and in the configuration directory.
|
|
bak2db.pl directoryserver bak2db-task
|
Restores the database from the most recent archived backup.
|
|
db2bak.pl directoryserver db2bak-task
|
Creates a backup of the current database contents
|
|
db2index.pl directoryserver db2index-task
|
Creates and regenerates indexes for attributes that are present in the database configuration as index attributes.
|
|
db2ldif.pl directoryserver db2ldif-task
|
Exports the contents of the database to LDIF.
|
|
ldif2db.pl directoryserver ldif2db-task
|
Imports LDIF files to database.
Runs the slapd (Windows) or ns-slapd (UNIX) command-line utility with the ldif2db keyword. By default, the script first saves and then merges any existing configuration tree (o=NetscapeRoot), with any files to be imported.
|
|
migrateInstance5 (not available on the Solaris Packages platform)
|
Migrates a 4.x or 5.0 version of the Directory Server to the 5.2 version, converting the configuration files to LDIF format.
Located in: /ServerRoot/bin/slapd/admin/bin
|
|
ns-accountstatus.pl directoryserver account-status
|
Provides account status information to establish whether an entry or group of entries is locked or not.
|
|
ns-activate.pl directoryserver account-activate
|
Activates an entry or a group of entries by unlocking it (them).
|
|
ns-inactivate.pl directoryserver account-inactivate
|
Inactivates an entry or a group of entries.
|
|
schema_push.pl
|
Updates the timestamp used by replication to ensure that manual schema modifications are replicated.
Located in: /ServerRoot/slapd-ServerID/
|
Shell and Batch Scripts
Some of the shell and batch scripts can be executed while the server is running. Others require that the server is stopped. The description of each script below indicates whether the server must be stopped, or if it can continue to run while you execute the script. When a Shell or Batch script has a Perl equivalent, a cross-reference to the section describing the equivalent Perl script is provided.
bak2db (Restore Database From Backup)
Restores the database from the most recent archived backup. To run this script the server must be stopped.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver bak2db backup_directory
|
|
Other platforms
|
bak2db backup_directory
|
For information on the equivalent Perl script, see "bak2db.pl (Restore Database From Backup)". For more information on restoring databases, see Chapter 3, "Populating Directory Contents" in the Sun ONE Directory Server Administration Guide.
db2bak (Create Backup of Database)
Creates a backup of the current database contents. This script can be executed while the server is running.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver db2bak [backup_directory]
|
|
Other platforms
|
db2bak [backup_directory]
|
For information on the equivalent Perl script, refer to "db2bak.pl (Create Backup of Database)".
db2ldif (Export Database Contents to LDIF)
Exports the contents of the database to LDIF. This script can be executed while the server is still running.
For information on the equivalent Perl script, refer to "db2ldif.pl (Export Database Contents to LDIF)".
For the shell and batch scripts, the script runs the slapd (Windows) or ns-slapd (UNIX) command-line utility with the ldif2db keyword.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver db2ldif options
|
|
Other platforms
|
db2ldif options
|
|
options
|
{-n backend_instance}* | {-s includesuffix}*
[{-x excludesuffix}*] [-r] [-C] [-u] [-U] [-m] [-M]
[-a outputfile] [-1] [-N]
|
Options
|
Option
|
Meaning
|
|
-a
|
File name of the output LDIF file.
|
|
-n
|
Instance to be exported.
|
|
-s
|
Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.
|
|
-x
|
Suffix(es) to be excluded.
|
|
-m
|
Minimal base64 encoding.
|
|
-M
|
Use of several files for storing the output LDIF, with each instance stored in instance_outfile (where outfile is the file name specified for -a option).
|
|
-r
|
Export replica.
|
|
-u
|
Request that the unique id is not exported.
|
|
-C
|
Only the main db file is used.
|
|
-N
|
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.
|
|
-U
|
Request that the output LDIF is not folded.
|
|
-1
|
For reasons of backward compatibility, delete the first line of the LDIF file, that gives the version of the LDIF standard.
|
|
Note
|
db2ldif -r cannot be used if another slapd process is running, because replication writes the RUV entry into the database during export. To export the database while a slapd process is running, use db2ldif.pl -r instead.
You must specify either the -n or the -s option (or both).
The output LDIF will be stored in one file by default. Should you want to specify the use of several files, then use the option -M.
|
getpwenc (Print Encrypted Password)
Prints the encrypted form of a password using one of the server's encryption algorithms. If a user cannot log in, you can use this script to compare the user's password to the password stored in the directory.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
/serverRoot/slapd-serverID/getpwenc storagescheme
clearpassword
|
|
Other platforms
|
getpwenc storagescheme clearpassword
|
Options
There are no options for this script.
For more information on the different storage schemes such as SSHA, SHA, CRYPT, and CLEAR, see Chapter 7, "User Account Management" in the Sun ONE Directory Server Administration Guide.
ldif2db (Import)
Runs the slapd (Windows) or ns-slapd (UNIX) command-line utility with the ldif2db keyword. To run this script the server must be stopped.
For information on the equivalent Perl script, see "ldif2db.pl (Import)".
|
Note
|
- ldif2db supports LDIF version 1 specifications. You can load an attribute using the :< URL specifier notation. For example:
jpegphoto:< file:///tmp/myphoto.jpg
Although the official notation requires three ///, the use of one / is tolerated. For more information on the LDIF format, see Appendix E "LDAP Data Interchange Format".
- The default behavior of a read-write replica that has been initialized either online or offline from a backup or an LDIF file, is NOT to accept client update requests. The replica will remain in read-only mode and refer any updated operations to other suppliers in the topology until the administrator does one of the following:
- changes the duration of the read-only mode default period using the ds5referralDelayAfterInit attribute
- manually resets the server to read-write mode using the ds5BeginReplicaAcceptUpdates attribute (once the replica has completely converged with the other suppliers in the topology)
The second option is advised because it does not present non-convergence risks. For more information, refer to Chapter 8, "Managing Replication" in the Sun ONE Directory Server Administration Guide.
|
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver ldif2db options
|
|
Other platforms
|
ldif2db options
|
|
options
|
-n backend_instance | {-s includesuffix}*
[{-x excludesuffix}*] {-i ldif-file}* [-O] [-Y
keydb-pwd] [-y keydb-pwd-file]
|
Options
|
Option
|
Meaning
|
|
-n
|
Instance to be imported. Ensure that you specify an instance that corresponds to the suffix contained by the LDIF file. Otherwise the data contained by the database is deleted and the import fails.
|
|
-s
|
Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.
|
|
-i
|
File name of the input ldif file(s). When you import multiple files, they are imported in the order in which you specify them on the command line.
|
|
-x
|
Suffix(es) to be included.
|
|
-O
|
Request that only the core db is created without attribute indexes.
|
|
-Y
|
Specifies the password for the key database (used for certificate-based client authentication).
|
|
-y
|
Specifies the file in which the password for the key database is held (used for certificate-based client authentication).
|
|
Note
|
You must specify either the -n or the -s option (or both).
|
ldif2ldap (Perform Import Operation Over LDAP)
Performs an import operation over LDAP to the Directory Server. To run this script the server must be running.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver ldif2ldap -D rootDN -w password
-f filename
|
|
Other platforms
|
ldif2ldap -D rootDN -w password -f filename
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN.
|
|
-f
|
File name of the file to be imported. When you import multiple files, they are imported in the order in which you specify them on the command line.
|
monitor (Retrieve Monitoring Information)
Retrieves performance monitoring information using the ldapsearch command-line utility.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver monitor
|
|
Other platforms
|
monitor
|
Options
There are no options for this script.
For more information on the ldapsearch command-line utility, see Chapter 1 "Command-Line Utilities."
restart-slapd (Restart Directory Server)
Restarts Directory Server.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver restart
|
|
Other platforms
|
restart-slapd
|
Options
There are no options for this script.
Exit Status
0: Server restarted successfully.
1: Server could not be started.
2: Server restarted successfully but was already stopped.
3: Server could not be stopped.
restoreconfig (Restore Administration Server Configuration)
By default, restores the most recently saved Administration Server configuration information to the NetscapeRoot suffix under the following directory:
/ServerRoot/slapd-serverID/config
To restore the Administration Server configuration:
- Stop Directory Server
- Run the restoreconfig script
- Restart Directory Server
- Restart the Administration Server for the changes to be taken into account.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver restoreconfig
|
|
Other platforms
|
restoreconfig
|
Options
There are no options for this script.
saveconfig (Save Administration Server Configuration)
Saves the Administration Server configuration information to the following directory
/ServerRoot/slapd-serverID/confbak
:This script will run only if the server is running.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver saveconfig
|
|
Other platforms
|
saveconfig
|
Options
There are no options for this script.
start-slapd (Start Directory Server)
Starts Directory Server.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver start
|
|
Other platforms
|
start-slapd
|
Options
There are no options for this script.
Exit Status
0: Server started successfully.
1: Server could not be started.
2: Server was already started.
stop-slapd (Stop Directory Server)
Stops Directory Server.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver stop
|
|
Other platforms
|
stop-slapd
|
Options
There are no options for this script.
Exit Status
0: Server stopped successfully.
1: Server could not be stopped.
2: Server was already stopped.
suffix2instance (Map Suffix to Backend Name)
Maps a suffix to a backend name.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver suffix2instance {-s suffix}
|
|
Other platforms
|
suffix2instance {-s suffix}
|
Options
|
Option
|
Meaning
|
|
-s
|
The suffix to be mapped to the backend.
|
vlvindex (Create Virtual List View (VLV) 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 you view search results. Using VLV indexes, you can organize search results alphabetically or in reverse alphabetical order, and you can scroll through the list of results. VLV index configuration must already exist prior to running this script.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver vlvindex options
|
|
Other platforms
|
vlvindex options
|
|
options
|
[-d debug_level] [-n backend_instance] [-s suffix]
[-T VLVTag]
|
Options
|
Option
|
Meaning
|
|
-d
|
Specifies the debug level to use during index creation. Debug levels are defined in "nsslapd-errorlog-level (Error Log Level)".
|
|
-n
|
Name of the database containing the entries to index.
|
|
-s
|
Name of the suffix containing the entries to index.
|
|
-T
|
VLV index identifier to use to create VLV indexes. You can use the console to specify VLV index identifier for each database supporting your directory tree, as described in the Sun ONE Directory Server Administration Guide. You can define additional VLV tags by creating them in LDIF, and adding them to Directory Server's configuration, as described in the Sun ONE Directory Server Administration Guide. In any case, we recommend you use the dn of the entry for which you want to accelerate the search sorting.
|
|
Note
|
You must specify either the -n or the -s option.
|
Perl Scripts
admin_ip.pl (Change IP Address)
When your system's IP address changes, you must update the local Administration Server configuration file and the configuration directory. If you do not enter the new IP address in these locations, you will not be able to start the Administration Server.
A Perl script is provided to help you update these two configurations. The script changes the IP address for an instance of Administration Server in both the local.conf file and the configuration directory. The script is called admin_ip.pl and is located in the serverRoot/shared/bin folder.
Usage
To run admin_ip.pl, follow the instructions for UNIX or Windows systems as appropriate:
On UNIX Systems
In the serverRoot/shared/bin folder, type the following:
admin_ip.pl Directory_Manager_DN Directory_Manager_password old_IP new_IP [port]
The old IP address is saved in a file called local.conf.old.
On Windows
From the command line go to the serverRoot/shared/bin folder and type the following:
../../install/perl admin_ip.pl Directory_Manager_DN
Directory_Manager_password old_IP new_IP [port]
The old IP address is saved in a file called local.conf.old.
bak2db.pl (Restore Database From Backup)
The perl script bak2db.pl creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver bak2db-task options
|
|
Other platforms
|
bak2db.pl options
|
|
options
|
[-v] -D rootDN {-w password | -w - | -j filename }
-a backup_directory [-t databasetype]
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager. The default is the DN of the directory manager, which is read from the nsslapd-root attribute under cn=config.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-a
|
Directory of the backup files.
|
|
-v
|
Verbose mode.
|
|
-t
|
Database type. Currently, ldbm is the only possible type and the default value.
|
db2bak.pl (Create Backup of Database)
The perl script db2bak.pl creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver db2bak-task options
|
|
Other platforms
|
db2bak.pl options
|
|
options
|
[-v] -D rootDN {-w password | -w - | -j filename }
-a backup_directory [-t databasetype]
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager. The default is the DN of the directory manager, which is read from the nsslapd-root attribute under cn=config.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-a
|
Directory where the backup files will be stored. By default it is under
ServerRoot/slapd-serverID/bak.
The backup file is named according to the year-month-day-hour format (YYYY_MM_DD_hh_mm_ss).
|
|
-v
|
Verbose mode.
|
|
-t
|
Database type. Currently, ldbm is the only possible type and the default value.
|
db2index.pl (Create and Generate Indexes)
Creates and generates the new set of indexes to be maintained following the modification of indexing entries in the cn=config configuration file. Note that indexes are generated only for those attributes that are present in the database configuration as index attributes.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver db2index-task options
|
|
Other platforms
|
db2bindex.pl options
|
|
options
|
[-v] -D rootDN {-w password | -w - | -j filename }
-n backend_instance [-t attributeName]
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-n
|
Instance to be indexed.
|
|
-t
|
Name of the attribute to be indexed. If omitted, all indexes defined for that instance are generated.
|
|
-v
|
Verbose mode.
|
|
Note
|
This perl script db2index.pl creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option.
|
db2ldif.pl (Export Database Contents to LDIF)
Exports the contents of the database to LDIF. This Perl script creates an entry in the directory that launches this dynamic task. The entry is generated based upon the values you provide for each option. The * indicates that multiple occurrences are allowed.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver db2ldif-task options
|
|
Other platforms
|
db2ldif.pl options
|
|
options
|
[-v] -D rootDN {-w password | -w - | -j filename }
{-n backend_instance}* |
{-s includesuffix}* [{-x excludesuffix}*]
[-a outfile] [-N] [-r] [-C] [-u] [-U] [-m] [-o]
[-1] [M]
|
|
Caution
|
To run this script the server must be running and either -n backend_instance or -s includesuffix is required.
This perl script bak2db.pl creates an entry in the directory that launches this dynamic task. An entry is generated based upon the values you provide for each option.
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-n
|
Instance to be exported.
|
|
-s
|
Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.
|
|
-a
|
File name of the output LDIF file.
|
|
-x
|
Suffix(es) to be excluded.
|
|
-m
|
Minimal base64 encoding.
|
|
-o
|
Output LDIF to be stored in one file by default with each instance stored in instance_outfile.
|
|
-r
|
Export replica.
|
|
-u
|
Request that the unique id is not exported.
|
|
-C
|
Only the main db file is used.
|
|
-N
|
Suppress printing sequential number.
|
|
-U
|
Request that the output LDIF is not folded.
|
|
-v
|
Verbose mode.
|
|
-1
|
For the purposes of backward compatibility, delete the first line of the LDIF file that gives the version of the LDIF standard.
|
|
-M
|
Output LDIF is stored in multiple files.
|
ldif2db.pl (Import)
To run this Perl script, the server must be running. This script creates an entry in the directory that launches this dynamic task. The entry is generated based upon the values you provide for each option.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver ldif2db options
|
|
Other platforms
|
ldif2db.pl options
|
|
options
|
[-v] -D rootDN {-w password | -w - | -j filename }
-n backend_instance |
{-s includesuffix}* [{-x excludesuffix}*]
[-O] [-c] [-g string] [-G namespace_id] {-i
filename}*
|
Options
|
Option
|
Meaning
|
|
-D
|
User DN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-n
|
Instance to be imported.
|
|
-s
|
Suffix(es) to be included. If used in conjunction with the -n option, this option specifies the subtree(s) to be included.
|
|
-i
|
File name of the input LDIF file(s). When you import multiple files, they are imported in the order in which you specify them on the command line.
|
|
-x
|
Suffix(es) to be excluded.
|
|
-O
|
Request that only the core database is created without attribute indexes.
|
|
-c
|
Merge chunk size.
|
|
-g string
|
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:
-g deterministic namespace_id
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 if 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.
|
|
-G namespace_id
|
Generates a namespace ID as a name-based unique ID. This is the same as specifying the -g deterministic option.
|
|
-v
|
Verbose mode.
|
migrateInstance5 (Migrate to Directory Server 5.x)
The migrateInstance5 Perl script (note that this is a Perl script despite the fact that it does not have the .pl extension) migrates a 4.x Directory Server to Directory Server 5.x. It can also be used to upgrade from Directory Server 5.0 or 5.1 to Directory Server 5.2.
When you run this script, it migrates the configuration files or configuration entries, database instances and schema with minimum manual intervention. The migrateInstance5 script calls on the migrateTo5 script, which then executes the migration.
For complete information on the configuration parameters and attributes that are migrated, see Chapter 6 "Migration From Earlier Versions."
Before performing the migration, check that the user-defined variables contain the following associated values, where ServerRoot is the path to where Sun ONE Directory Server 5.2 is installed:
|
$PERL5LIB
|
ServerRoot/bin/slapd/admin/bin
|
|
PATH
|
ServerRoot/bin/slapd/admin/bin
|
Syntax
migrateInstance5 -D rootDN {-w password | -w - | -j filename }
-n backend_instance -p port -o 4.xInstancePath -n 5.xInstancePath [-t] [-L]
Options
|
Option
|
Meaning
|
|
-D
|
Directory Server 5.2 userDN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the Directory Server 5.2 user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-p
|
Directory Server 5.2 port.
|
|
-o 4.xInstancePath
|
Netscape Directory Server 4.x.
|
|
-n 5.0InstancePath
|
Path for the new Directory Server 5.0 instance.
|
|
-t
|
Trace level. The trace level is set to 0 by default with a valid range of 0 to 3.
|
|
-L
|
File in which to log the migration report. By default the migration report is stored under
ServerRoot/slapd-serverID/logs/Migration_ddmmyyy_hhmmss.log
A sample log might contain:
/ServerRoot/slapd-serverID/logs/Migration_20022003_153604.
log
for a log created on 20 February 2003 at 15.36:04.
|
ns-accountstatus.pl (Establish Account Status)
Provides account status information to establish whether an entry or group of entries is inactivated or not.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver account-status options
|
|
Other platforms
|
ns-accountstatus.pl options
|
|
options
|
[-D rootDN] {-w password | -w - | -j filename }
[-h host] [-p port] -I DN
|
Options
|
Option
|
Meaning
|
|
-D
|
Directory Server 5.2 userDN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-p
|
Directory Server 5.2 port. The default value is the Directory Server LDAP port, specified at installation time.
|
|
-h
|
Host name of Directory Server 5.2. The default value is the full host name of the machine on which Directory Server is installed.
|
|
-I DN
|
Entry DN or role DN whose status is required.
|
ns-activate.pl (Activate an Entry or Group of Entries)
Activates an entry or group of entries.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver account-activate options
|
|
Other platforms
|
ns-activate.pl options
|
|
options
|
[-D rootDN] {-w password | -w - | -j filename }
[-h host] [-p port] -I DN
|
Options
|
Option
|
Meaning
|
|
-D
|
Directory Server 5.2 userDN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-p
|
Directory Server 5.2 port. The default value is the Directory Server LDAP port, specified at installation time.
|
|
-h
|
Host name of Directory Server 5.2. The default value is the full host name of the machine on which Directory Server is installed.
|
|
-I DN
|
Entry DN or role DN to activate.
|
ns-inactivate.pl (Inactivate an Entry or Group of Entries)
Inactivates, and thus locks, an entry or group of entries.
Syntax
|
Platform
|
Syntax
|
|
Solaris Packages
|
directoryserver account-inactivate options
|
|
Other platforms
|
ns-inactivate.pl options
|
|
options
|
[-D rootDN] {-w password | -w - | -j filename }
[-h host] [-p port] -I DN
|
Options
|
Option
|
Meaning
|
|
-D
|
Directory Server 5.2 userDN with root permissions, such as Directory Manager.
|
|
-w
|
Password associated with the user DN. If you do not specify this option, anonymous access is used. If you specify -w -, the utility prompts for the password. If either -w option is specified, the -j option must not be specified. For example, -w diner892.
|
|
-j
|
Specifies the file from which the bind password is read. Used for simple authentication. If this option is specified, the -w option must not be specified.
|
|
-p
|
Directory Server 5.2 port. The default value is the Directory Server LDAP port, specified at installation time.
|
|
-h
|
Host name of Directory Server 5.2. The default value is the full host name of the machine on which Directory Server is installed.
|
|
-I DN
|
Entry DN or role DN to inactivate.
|
schema_push.pl
When schema modifications are made manually (by editing the .ldif files directly), this script should be run to update the modification time used by replication. This ensures that the modified schema are replicated to the consumers. Once the script has been run, you must restart the server to trigger the schema replication.
Syntax
/ServerRoot/slapd-serverID/schema_push.pl