Project: ldapsync.pl

Pre-Requisites:

  • Perl 5.6.1, Net::LDAP, AppConfig

License: GNU Public License (v2)

ChangeLog:

    Date Version Notes
    October 4th 2010 1840 Updates from Martin Kreiner
    - eliminate the need of synchronized server/client time
    - several fixes and speed-ups
    September 7th 2010 1566 Added more updates from Martin Kreiner
    - make "timeout" a config option
    - set timeout option on dstldap
    August 27th 2010 1560 Added updates from Martin Kreiner
    August 6th 2010 1394 Added updates from Martin Kreiner; don't delete dstdn!
    July 4th 2010 1385 Added updates from Martin Kreiner; revised filter
    November 16th 2005 1.16 Added a -prime command line option, so you can force a full resync of every entry in your source LDAP server.
    September 16th 2005 1.9 Rewrite to use AppConfig and /etc/ldapsync.conf rather than hard coded config settings. Also incorporated changes from Andreas Kotes.
    May 9th 2004 1.3 Included updates from Count
    November 24th 2002 1.2 Initial release

Description:

    This script tries to keep two ldap directory trees in sync by using the 'modifyTimestamp' flag on the source server to spot new or changed records. These records are then copied to the local machine and then either inserted (for new records) or updated (for existing records) on the target server.

    Each record on the target server is then checked to see if it exists on the source server; if it doesn't, then the record is deleted from the target server. You can't get a 'modifyTimestamp' attribute on a deleted record!

Caveats:

    Tested on the Sun Microsystems Directory Server (5.1) that is bundled with Solaris 9 and then on OpenLDAP version 2.3.4 on both Solaris and Debian Linux.

    When you first run it, you may need to supply the command line option '-prime' to force all the containers to be created on the destination LDAP server. If you need to rebuild a destination server, this option is also useful for doing what it says, re-priming the destination server with all the entries from the source server.

Authors:

    marty - at - maui dot co dot uk
    Count - Andreas Kotes
 
Harbour Wall image
Donate to help fund our open source software and articles.



Valid XHTML 1.0 Transitional
Valid CSS!