HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

4.1.3.2 Importing using the ldif2db.pl Perl script
As with the ldif2db script, the ldif2db.pl script overwrites the data in the specified database.
This script requires the server to be running in order to perform the import.
CAUTION:
This script overwrites the data in the database whether the command is successful or not.
1. Run the ldif2db.pl script.
/opt/dirsrv/slapd-instance_name/ldif2db.pl -D "cn=Directory Manager" -w secret \
-I /var/opt/dirsrv/slapd-instance_name/ldif/demo.ldif -n Database1
For more information about using this script, see the HP-UX Directory Server configuration,
command, and file reference.
NOTE:
You do not need root privileges to run the script, but you must authenticate as the Directory
Manager.
Table 18 ldif2db options
DescriptionOption
Specifies the DN of the administrative user.-D
Specifies the password of the administrative user.-w
Specifies the LDIF files to be imported. This option is required. To important multiple LDIF files at
a time, use multiple -i arguments. When multiple files are imported, the server imports the LDIF
files in the order they are specified in the command line.
-i
Specifies the name of the database to which to import the data.-n
4.1.3.3 Importing using the ldif2ldap command line script
The ldif2ldap script appends the LDIF file through LDAP. Using this script, data are imported to
all directory databases at the same time. The server must be running in order to import using
ldif2ldap.
To import LDIF using ldif2ldap:
1. Run the ldif2ldap command line script.
/opt/dirsrv/slapd-instance_name/ldif2ldap "cn=Directory Manager" secret \
/var/opt/dirsrv/slapd-instance_name/ldif/demo.ldif
The ldif2ldap script requires the DN of the administrative user, the password of the
administrative user, and the absolute path and file name of the LDIF files to be imported.
For more information about using this script, see the HP-UX Directory Server configuration,
command, and file reference.
4.1.3.4 Importing through the cn=tasks entry
The cn=tasks, cn=config entry in the Directory Server configuration is a container entry for
temporary entries that the server uses to manage tasks. Several common directory tasks have
container entries under cn=tasks, cn=config. Temporary task entries can be created under
cn=import, cn=tasks, cn=config to initiate an import operation.
As with the ldif2db and ldif2db.pl scripts, an import operation in cn=tasks overwrites all
the information in the database.
4.1 Importing data 153