Metamerge logo
Search

Advanced Search
*
*
*
* HOME DOCUMENTS & RESOURCES DOWNLOADS EARLY TECH ACCESS SUPPORT FAQ KNOWN ISSUES OLD VERSIONS
*

 

Copying Directories with the LDAP Connector

Usually, the best way to do this is to export (using LDIF) from one server, and then importing it to the other. However, if you want to do this using Integrator in order to get some more control, read on.

You could do the copying by having a very simple AssemblyLine containing two Connectors:  

  1. An Iterator Connector (reading the source directory)  using a one level scope
  2. A Addonly Connector (updating the target directory)

Naturally a recursion must be introduced to copy the entire tree. We will start the same AssemblyLine over and over, but the search base would be set to whatever DN has just been inserted in the target directory:

for all entries returned in current level 
    add entry in target system 
    if (success) 
        start same AL with search base level set to current's entry DN

The starting of ALs can be parallelised to make the processing faster. Of course the number of threads could explode but it is possible to control it (see the example further down in this document). 

A configuration file showing you how to do this is enclosed here. Because the Admin Tool sets the -w parameter you will have to start Integrator from the command line

    miserver -rDumpDir -cDumpDirectory.cfg

The code customisation is done in 

  • the AddOnly Connector (on_success hook: It starts a new AL with an initial entry that the Prolog will pick up ) 
  • in the AssemblyLine Prolog (Before Connectors Initialized). 

The example limits the number of active threads to 20, feel free to increase it if you have the resources.

Download example

 

 

*
  Metamerge Integrator version 4.6 ©Copyright Metamerge AS 2000-2002 Last edited 2002-06-10 contact us