Exporting Data

Option

-n

Description

files at a time, use multiple -iarguments. When multiple files are imported, the server imports the LDIF files in the order they are specified in the command-line.

Specifies the name of the database to which to import the data.

Table 4.3. ldif2db Options

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, do the following:

1.Open the Directory Server instance directory:

cd /usr/lib/dirsrv/slapd-instance_name

2.Run the ldif2ldap command-line script.

ldif2ldap "cn=Directory Manager" secretpwd /var/lib/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 filename of the LDIF files to be imported.

For more information about using this script, see the Directory Server Configuration, Command, and File Reference.

2. Exporting Data

LDAP Data Interchange Format (LDIF) files are used to export database entries from the Directory Server databases. LDIF is a standard format described in RFC 2849, The LDAP Data Interchange Format (LDIF) - Technical Specification.

Exporting data can be useful for the following:

• Backing up the data in the database.

119

Page 139
Image 139
HP UX Red Hat Direry Server Software Exporting Data, Importing Using the ldif2ldap Command-Line Script, Ldif2db Options