• Find us:
    +1-669-900-5138   |   +44-203-372-5553
  • Free Newsletter

    Get Latest Updates

  • Make Training Enquiry


  • Categories

  • Archive

  • Backing up and restoring a small directory : OID 11g

    Posted by "" in "oid" on 2014-05-07

    Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInEmail this to someone

    Hi All,

    This is one of the most common activity that every IDM assignment might consist of, backing up and restoring LDAP. In this post I would like to provide an insight about backing up and restoring details for Oracle Internet Directory 11g.

    Essentially what you need to take backup is :

    • Users and group data : Containing under realm say dc=oracle,dc=com
    • Schema: object classes and attributes
    • LDAP configuration: such as configuration set etc.,

    For a small LDAP there are two ways to take backup:

    1. Stopping all OID processes and taking backup of database schemas ODS, ODSSMĀ  (OR)
    2. Backing up ldap content (both ldap data + schema) into ldif files.

    Backing up and restoring production environments is a topic for another day.

    Backing up OID environment:

    1. Shutdown OID process using opmnctl.
    2. Set ORACLE_HOME env variable.
    3. Run the command $ORACLE_HOME/ldap/bin/ldifwrite connect=”OIDDB” basedn=”dc=oracle,dc=com” ldiffile=”oid_backup.ldif”
    4. NOTE: Fetch the OID connection string value from file $AS_INSTANCE/config/tnsnames.ora. Specify the basedn for the data that you want to fetch and this is used for specific naming context backup. If you want to fetch complete OID, specify it as blank say “”.
    5. Start the OID process using opmnctl.
    6. Run the command to backup schema $ORACLE_HOME/bin/ldapsearch -h OID_Host -p OID_Port -D cn=orcladmin -w OID_Password -L -b “cn=subschemasubentry” -s base “objectclass=*” > oid_schema.ldif

    Restoring OID environment:

    OID restoration can happen in the same node or different node.

    1. Shutdown the target OID node. Copy the oid_backup.ldif and oid_schema.ldif to the location $ORACLE_HOME/ldap/bin.
    2. Run the command to delete all entries in new OID node $ORACLE_HOME/ldap/bin/bulkdelete connect=”OIDDB” basedn=””
    3. Run the command to load the new entries $ORACLE_HOME/ldap/bin/bulkload connect=”OIDDB” generate=”TRUE” load=”TRUE” restore=”TRUE” file=”oid_backup.ldif”
    4. Run the command to load the schema ./bulkload connect=”OIDDB” generate=true load=true restore=true file=../../bin/oid_schema.ldif
    5. Start the OID process using opmnctl. Test the OID using ldapbind.

    Output files:

    The bulk utilities will write the logs to several files:

    $AS_INSTANCE/diagnostics/logs/OID/tools/bulkload.log: This file contains the bulkload command output.

    $AS_INSTANCE/diagnostics/logs/OID/tools/duplicateDN.log: This file contains the list of duplicate DNs found while running bulkload command.

    $AS_INSTANCE/diagnostics/logs/OID/tools/bulkdelete.log: This file contains the bulkdelete command output.

    $AS_INSTANCE/diagnostics/logs/OID/tools/ldifwrite.log: This file contains the bulkwrite command output.

    $AS_INSTANCE/OID/load/badentry.ldif: This file contains a list of bad LDIF entries.

    Hope this helps. Please write your suggestions/comments.

    Leave a Reply

  • K21 Technologies is among the most experienced Oracle Gold Partner for Identity Access Management service providers. We work with application development companies and in-house technology division to help achieve significant returns on their IT security investment. Our clientele includes some of the globally renowned corporate, which speaks of our expertise in our field.

    We have the most talented and experienced team that can swiftly deploy security solutions even in complex IT ecosystem. Our clients highly appreciate our timely implementation, interactive training, on-demand support and community resources.

    K21 Technologies
    8 Magnolia Place, Harrow,
    London, HA2 6DS

    UK: +44(0)7476444481
    USA: +1-888-414-1821

  • 2014, K21 Technologies. All rights reserved DMCA.com
  • TOP