LDAP: Compare entries in two directory server databases with ldap-diff


The ldap-diff utility provides a way to compare the data stored in two directory server
databases. The ldap-diff command-line tool is shipped with the UnboundID Directory Server.

Following is an example of executing the utility in my lab on two servers which replicate
between each other containing 10008 entries:

$ ldap-diff --sourceHost lab.example.com                  \
            --sourcePort 11389                            \
            --sourceBindDn cn=RootDn                      \
            --sourceBindPasswordFile ./.pwdFile           \
            --sourceDnsFile /ds/servers/dn.list.txt       \
            --targetHost lab.example.com                  \
            --targetPort 12389                            \
            --targetBindDn cn=RootDn                      \
            --targetBindPasswordFile /ds/servers/.pwdFile \
            --baseDn dc=example,dc=com -o diff.ldif       \
            --numConnections 64                           \
            --numPasses 1                                 \
            --secondsBetweenPass 1
[13:06:08]  Starting to read DNs from /ds/servers/dn.list.txt
  (under base DN dc=example,dc=com)
[13:06:08]  Starting to dump DNs from server 
  ldap://lab.example.com:12389 under base DN 
  dc=example,dc=com matching filter (objectclass=*)
[13:06:08]  Found 10008 entries at server 
  ldap://lab.example.com:11389 that matched the specified criteria
[13:06:08]  Found 10008 entries at server 
  ldap://lab.example.com:12389 that matched the specified criteria
[13:06:08]  Starting pass 1 of 1.  Comparing 10008 entries out of a total of 10008
[13:06:09]  Completed pass 1 of 1.  Compared 10008 entries.
  10008 were identical, 0 were out-of-sync, and 0 no longer exist on either server
[13:06:09]  Completed all passes.  All 10008
   entries were identical on both servers

About Terry Gardner

Terry Gardner was a leading directory services architect with experience with many large scale directory services installations and messaging server installations, and was a Subject Matter Expert in the field of Directory Services and Solaris (operating system) performance. Mr. Gardner also participated in the open-source software community. Mr. Gardner passed away in December, 2013.
This entry was posted in LDAP, UnboundID and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s