Oracle® Identity Management User Reference
10g Release 2 (10.1.2) B15883-01 |
|
Previous |
Next |
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: Theldifwrite 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.
ldifwrite [-c connect_string] -b "basedn" -f file_name [-E character_set] [-t num_threads]
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.
Using the ldifwrite
command-line tool, you can perform the following tasks
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
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