Sun Java System Directory Server Enterprise Edition 6.3 Troubleshooting Guide

Doing a Clean Reinitialization

All of the reinitialization methods copy unnecessary data, for example data that contains values that were deleted or that maintain state information or other historical data. This unnecessary data makes the entry larger in disk. Also, the entry state information may need to be purged. If the root cause of the replication problem is related to this state information, the data is still present in the database and can cause another replication error. To avoid importing this unnecessary and potentially problematic data, you can do a clean reinitialization of your topology.

When you do a clean reinitialization, you create a clean master copy of the data that contains smaller databases, indexes, and empty change logs. A clean reinitialization uses less disk space and takes less time because it does not make backup copies of the database files. It also reduces index fragmentation, which can reduce performance. However, it requires you to stop the server that is being cloned to ensure that the database files are in a coherent state.

ProcedureTo Create Clean Master Data in a 6.3 Version of Directory Server

  1. Stop the master server.

  2. Export the database contents using the dsadm command.

    Specify the -Q option so that replication information is not included in the export.


    # dsadm export -Q instance-path suffix-DN  /tmp/clean-export.ldif
  3. Reimport the exported data to the same master server using the dsadm command.


    # dsadm import instance-path /tmp/clean-export.ldif suffix-DN
    
  4. Restart the master server.

    The master server now contains clean data, meaning it contains smaller databases, indexes, and empty change logs.

  5. Import the clean master data, to all of the other servers in your system.

    Use one of the three methods described in Overview of Reinitialization Methods.

ProcedureTo Create Clean Data in a 5.x Version of Directory Server

  1. Stop the master server.

  2. Export the database contents using the db2ldif script without the -r option.


    # db2ldif -n database1 -a /tmp/clean-export.ldif
  3. Reimport the exported data to the same master server using the ldif2db script.


    # ldif2db -n database1 -i /tmp/clean-export.ldif
  4. Restart the master server.

    The master server now contains clean data, meaning it contains smaller databases, indexes, and empty change logs.

  5. Import the clean master data, to all of the other servers in your system.

    Use one of the three methods described in Overview of Reinitialization Methods.