Discovery of AD/ADAM source using DELTA (DIFF) Discovery functions
Created: 2012-04-20 08:09:59Modified: 2017-06-22 11:35:10
Tags: SimpleSync
Previously, the normal sync process was broken down into two basic phases (Discovery & Sync). With the introduction of Delta (Diff) Discovery, the key change is to the Discovery process. Rather than reading the full directory on every run, the DIFF Discovery function (ldap-diff) will pull only source ‘changes’ into a .DIFF file. Then, the DIFF Merge function (diff-ldif) will take the contents of the .DIFF file and apply them to the LDIF.txt file. The two DIFF functions run very quickly, reducing the Discovery time to a fraction of the time it usually takes to read the entire source using standard Discovery. The end result of the two DIFF functions is a standard (complete) ldif.txt file. The normal Sync phase is run as usual, processing ldif.txt and writing changes to the destination.
There are special considerations regarding the use of Delta DIFF processing that should be reviewed.
Standard Discovery and Syncs may be run via GUI or command line. At present, while you create a Delta (DIFF) Discovery connection in the GUI as usual, the new DIFF Discovery processes may only be executed from the command line only.
The below instructions outline how to configure your connection and use command line processes to test this new functionality. These same command line functions may be scripted to automate/schedule the new solution.
1) Upgrade to the latest version in the usual manner. Either backup your existing install directory and then install to overwrite your existing installation, or install to a new directory and copy \connections, \global\map\custom, \global\sourcedef\custom, \global\key.dat.
2) Run the SimpleSync GUI and configure your connection as you normally would. It is recommended you give your connection a name indicating it will be used for DIFF Discovery/Sync Processing (i.e. DIFF Sync ADAM-AD) and add a comment on the General tab to indicate this as well.
3) Run a normal Discovery to generate a complete LDIF.txt - Prior to implementing the DIFF Discovery process, a normal Discovery must be run at least ONCE. This builds the initial complete LDIF file required for syncing.
If you are implementing this process to overcome a slow connection or disconnect problems , it may not be possible to run a normal Discovery.
In this case, you must have someone install SimpleSync locally near the Source, run Discovery and forward the LDIF.txt file to you. ( You may need to obtain a temp key to allow the remote Discovery.)
Once received, you will copy the ldif.txt to \ Connections\ DIFF Sync ADAM-AD \ldif.txt.
(This remote Discovery run need only be done once, to build the initial complete ldif.txt file.
4) Disable Discovery on the connection. On the General tab, uncheck (disable) the ‘Discovery’ check box. Click Apply to save the connection. This will disable standard Discovery on future sync runs.
5) Run the connection to execute a normal Sync - Run the connection once, to execute an initial Sync to your destination directory. Confirm a successful sync, verify the expected number of objects were created on the destination. Then close the GUI. Future syncs will be performed via command line calls (or script) to execute the DIFF Discovery processes and Sync phase. Here after, you should no longer run this connection from the GUI.
6) Make a few changes to the source directory… A few Adds, Mods, Deletes.
Note: Mods & Deletes in (AD/ADAM) show up to the DIFF almost instantly. Adds take longer.
7) Open a Command Prompt and CD into \SimpleSync-v4.8\programs.
8) Execute the DIFF Discovery (ldap-diff.exe)
ldap-diff “DIFF Sync ADAM-AD”
The result of this process is a .diff file. It will contain a record for each source object for all recent Adds, Mods and Deletes. Note: you may run ldap-diff multiple times to generate multiple .diff files (making more source changes in between each run). The Merge function will process all available .diff files.
9) Execute the DIFF Merge (diff-ldif.exe)
diff-ldif “DIFF Sync ADAM-AD”
This process will read all .diff files and apply the changes to your master ldif.txt file. When the diff-ldif process completes successfully, your .diff files will be automatically deleted. The result is a fully up to date ldif.txt.
10) Finally, execute the Connection to run Sync. (Recall you disabled Discovery, so only Sync will run).
shell “DIFF Sync ADAM-AD”
This runs a normal sync process, reading the LDIF.txt and syncing to the Destination as usual.
11) For ongoing syncing of this connection, you will need to run this multi function process. The easiest way to do this is via a Script, which you may also schedule to be run automatically.
A script to process a DIFF Discovery/Sync connection would look like this:
c:\ cd \simplesync-v4.8\programs ldap-diff “DIFF Sync ADAM-AD” diff-ldif “ DIFF Sync ADAM-AD ” shell “ DIFF Sync ADAM-AD ”
See Scheduling Batch Execution in the Automating/Scheduling knowledge base article.
Please contact Support@dirwiz.com with any questions, comments or problems.