Skip Headers
Oracle® Identity Management User Reference
10g Release 2 (10.1.2)
B15883-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

4.15 ldifwrite

The ldifwrite command-line tool enables you to convert to LDIF all or part of the information residing in an Oracle Internet Directory. Once you have converted the information, you can load it into a new node in a replicated directory or another node for backup storage.


Note:

The ldifwrite tool output does not include operational data of the directory itself—for example, cn=subschemasubentry, cn=catalogs, and cn=changelog entries. To export these entries into LDIF format, use ldapsearch with the -L flag.

The ldifwrite tool performs a subtree search, including all entries below the specified DN, including the DN itself.

4.15.1 Syntax for ldifwrite

ldifwrite [-c connect_string] -b "basedn" -f file_name [-E character_set]  [-t num_threads]

4.15.2 Arguments for ldifwrite

connect=connect_string

Optional. The directory database connect string. If you already have a tnsnames.ora file configured, then this is the net service name specified in that file, which is located in $ORACLE_HOME/network/admin. If not provided, defaults to the value of $ORACLE_SID environment variable.

-f file_name

Required. The full path and file name of the output LDIF file.

-b "basedn"

Required. The base DN of the subtree to be written out in LDIF format.

If the base DN is a replication agreement entry, then you can back up part of the naming context based on the LDAP naming context configuration. Specify the replication agreement DN in this case.

-E "character_set"

Optional. The native character set encoding. Defaults to the character set of the user's terminal. Each supported character set has a unique acronym, for example, WE8MSWIN1252, JA16SJIS, or AL32UTF8.

-t num_threads

Optional. The number of threads used to read from the directory store and write to the LDIF output file. The default is the number of CPUs plus one.

4.15.3 Tasks and Examples for ldifwrite

Using the ldifwrite command-line tool, you can perform the following tasks

4.15.3.1 Converting All Entries under a Naming Context to an LDIF File

The following example writes all the entries under ou=Europe,o=imc,c=us into the output1.ldi file.

The LDIF file and the intermediate file are always written to the current directory.

The ldifwrite tool includes the operational attributes of each entry in the directory, including createtimestamp, creatorsname, and orclguid.

When prompted for the Oracle Internet Directory password, enter the password of the ODS database user account. The default password is ods.

Example:

ldifwrite -c nldap -b "ou=Europe, o=imc, c=us" -f output1.ldif

4.15.3.2 Converting a Partial Naming Context to an LDIF File

The following example uses the following naming context objects defined in partial replication:

dn: cn=includednamingcontext000001,  cn=replication namecontext,  orclagreementid=000001,  orclreplicaid=node replica identifier,  cn=replication configuration
orclincludednamingcontexts: c=us
orclexcludednamingcontexts: ou=Americas, c=us
orclexcludedattributes: userpassword
objectclass: top
objectclass: orclreplnamectxconfig

In this example, all entries under c=us are backed up except ou=Americas,c=us. The userpassword attribute is also excluded.

Example:

ldifwrite -c connect_string -b "cn=includednamingcontext000001, \
          cn=replication namecontext,orclagreementid=000001, \
          orclreplicaid=node replica identifier,cn=replication configuration" \
          -f file_name

4.15.4 Related Command-Line Tools for ldifwrite