PingDirectory

Synchronize a specific list of DNs

About this task

The resync command enables synchronizing a specific set of DNs that are read from a file using the --sourceInputFile option. This option is useful for large datasets that require faster processing by targeting individual base-level searches for each source DN in the file. If any DN fails (parsing, search, or process errors), the command creates an output file of the skipped entries (resync-failed-DNs.log), which can be run again.

The file must contain only a list of DNs in LDIF format with dn: or dn::. The file can include comment lines. All DNs can be wrapped and are assumed to be wrapped on any lines that begin with a space followed by text. Empty lines are ignored.

Small files can be created manually. For large files, use the ldapsearch command to create an LDIF file, as follows:

Steps

  1. Run an ldapsearch command using the special OID "1.1" extension, which only returns the DNs in the DIT. For example, on the Sync Source directory server, run the following command:

    $ bin/ldapsearch --port 1389 \
      --bindDN "uid=admin,dc=example,dc=com \
      --baseDN dc=example,dc=com \
      --searchScope sub "(objectclass=*)" "1.1" > dn.ldif
  2. Run the resync command with the file.

    $ bin/resync --pipe-name "sun-to-ds-pipe" \
      --sourceInputFile dn.ldif
    Starting pass 1
    [20/Mar/2016:10:32:11 -0500]
    -------------------------------------
    Resync pass 1
    Source entries retrieved 1999
    Entries created 981
    Current pass, entries processed 981
    Duration (seconds) 10
    Average ops/second 98
    Status after completing all passes[20/Mar/2016:10:32:18 -0500]
    ----------------------------------
    Source entries retrieved 2003
    Entries created 2003
    Duration (seconds) 16
    Average ops/second 98
    Resync completed in 16 s.
    0 entries were in-sync, 0 entries were modified, 2003 entries were
    created, 0 entries are still out-of-sync, 0 entries are still missing, and
    0 entries could not be processed due to an error
  3. View the logs/tools/resync-failed-DNs.log to determine skipped DNs. Correct the source DNs file, and rerun the resync command.