ddsetup

Use the ddsetup to split an LDIF file for loading it in distributed directories.

Description

The ddsetup command splits a lightweight directory information format (LDIF) file by using the partition algorithm that is specified in the configuration file of proxy server. The split LDIF files can be loaded into a distributed directory. You can specify the partition algorithm in the ibm-slapdDNPartitionPlugin attribute of a proxy server configuration file.

Restriction: Composite DN is not supported by the ddsetup command.

Synopsis

 ddsetup [[-I proxy_inst_name] [-B base_DN] [-i input_file]]
         | [-f config_file] [-d debug_level] [-l output_location] 
         [-s] [-v] -?

Options

The options for the ddsetup command are listed.
-B base_DN
Specifies the base DN or split DN to partition entries by the ddsetup command.
-d debug_level
Specifies the LDAP debug level to use with the ddsetup command.
-f config_file
Specifies the configuration file to use with the ddsetup command.
-I proxy_inst_name
Specifies the name of the proxy server instance.
-i input_file
Specifies the file from which to read.
-l output_location
Specifies the directory to place the output files from the ddsetup command.
-s
Specifies to set the statistics mode for the ddsetup command.
-v
Specifies to show the version information of the ddsetup command.
-?
Specifies to show the syntax help of the command.

Examples

Distributing data between back-end servers
Consider a database with 5 million entries for the o=sample subtree. You want to distribute this data over five back-end servers. Export the entries to an LDIF file for distributing the entries among the back-end servers. For information about exporting data to an LDIF file, see idsdb2ldif, db2ldif.
You must cryptographically synchronize the back-end servers. To synchronize, the encryption seed and salt values for the back-end servers must be same. To create an LDIF file for each back-end server by using the partition algorithm of the proxy server, run the following steps:
  1. To create an LDIF file, run the idsdb2ldif command. For example:
    idsdb2ldif -o mydata.ldif -s o=sample -I instance_name
  2. Run the ddsetup command to split the data.
    ddsetup –I proxy_instance -B o=sample -i mydata.ldif
    The ddsetup command divides the mydata.ldif file into multiple LDIF output files. The files are created based on the number of partitions that are defined in the configuration file of the proxy server. The first output file corresponds to the partition index 1. The second output file corresponds to the partition index 2.
  3. Run the idsldif2db or idsbulkload command to load the data to an appropriate back-end server. For each partition index value, you can create an LDIF file. You must load the correct LDIF file on the back-end server with the corresponding partition index value. Otherwise, the proxy server might not be able to retrieve the entries.
    ServerA (partition index 1) - out1.ldif
    ServerB (partition index 2) - out2.ldif
    ServerC (partition index 3) - out3.ldif
    ServerD (partition index 4) - out4.ldif
    ServerE (partition index 5) - out5.ldif
Distributing data between servers for multiple subtrees
You can split data among multiple subtrees. Consider a parent DN entry, o=sample, split among three subtrees: ou=austin,o=sample, ou=raleigh,o=sample, and ou=poughkeepsie,o=sample. The data on each of these subtrees is further subdivided between the back-end servers. For example:
  • ou=austin,o=sample - five back-end servers
  • ou=raleigh,o=sample - three back-end servers
  • ou=poughkeepsie,o=sample - four back-end servers
  1. To create an LDIF file from an existing database, run the idsdb2ldif command. For example:
    idsdb2ldif -o mydata.ldif -s o=sample -I instance_name
  2. Run the ddsetup command to split the data.
    ddsetup –I proxy_instance -B "o=sample" -i mydata.ldif
    where, proxy_instance is a proxy server instance.

    The ddsetup command divides the mydata.ldif file into multiple LDIF output files. The first output file for the subtree corresponds to the partition index 1. The second output file corresponds to the partition index 2, and so on. The partition index number starts from 1 for each subtree that is being distributed.

  3. Use idsldif2db or idsbulkload command to load the data to an appropriate back-end server. An example file is created for each partition index value. You must load the correct LDIF file on the back-end server with the corresponding partition index value. Otherwise, the proxy server might not be able to retrieve the entries.
    ServerA (partition index 1) - out1_ServerA.ldif
    ServerB (partition index 2) - out2_ServerB.ldif
    ServerC (partition index 3) - out3_ServerC.ldif
    ServerD (partition index 4) - out4_ServerD.ldif
    ServerE (partition index 5) - out5_ServerE.ldif
    ServerF (partition index 1) - out1_ServerF.ldif
    ServerG (partition index 2) - out2_ServerG.ldif
    ServerH (partition index 3) - out3_ServerH.ldif
    ServerI (partition index 1) - out1_ServerI.ldif
    ServerJ (partition index 2) - out2_ServerJ.ldif
    ServerK (partition index 3) - out3_ServerK.ldif
    ServerL (partition index 4) - out4_ServerL.ldif
Splitting the ddsample.ldif file
An example that describes how to use the ddsetup command to split the ddsample.ldif file.
  1. Create a proxy server instance. Run the idsicrt command, for example:
    idsicrt -I proxy_instance -x -l instance_location -G idsldap -w proxyPW
    
    where,
    • proxy_instance is the proxy server instance and also the name of the proxy instance owner
    • proxyPW is the password of the proxy instance owner
  2. Configure o=sample as a partition base on the proxy server. Run the idscfgsuf command, for example:
    idscfgsuf -I proxy_instance -s o=sample
    
    where,
    • proxy_instance is the proxy server instance name
    • o=sample is the configured partition base with the proxy server
  3. Set the administrator DN and password for the proxy server instance. Run the idsdnpw command, for example:
    idsdnpw -I proxy_instance -u cn=root -p rootPWD
    
    where,
    • proxy_instance is the proxy server instance name
    • cn=root is the administrator DN
    • rootPWD is the administrator password
  4. Start the proxy server instance in configuration-only mode. Run the ibmslapd command, for example:
    ibmslapd -I proxy_instance -a
    
    where, proxy_instance is the proxy server instance name
  5. Add the configuration for splitting o=sample into three partitions. Run the ldapadd command, for example:
    ldapadd -D cn=root -w rootPWD -p port -f ddibmslapd.conf
    
    where,
    • cn=root is the administrator DN
    • rootPWD is the administrator password
    • port is the port number on which the proxy server is listening
    • ddibmslapd.conf is the sample configuration file
  6. To split the LDIF file, run ddsetup with the sample data.
    ddsetup -I proxy_instance -B o=sample -i ddsample.ldif
    
    where,
    • proxy_instance is the proxy server instance
    • o=sample is the partition base
    • ddsample.ldif is the sample LDIF file
    The ddsample.ldif and ddibmslapd.conf files are available in the examples directory. The ddsetup command divides the ddsample.ldif into multiple LDIF output files. The first output file for the subtree corresponds to the partition index 1. The second output file corresponds to the partition index 2, and so on. The partition index number starts from 1 for each subtree that must be distributed. The ddsetup command generates the following files.
    sample_1.ldif
    sample_2.ldif
    sample_3.ldif
    default.ldif
    The default.ldif file contains all the entries that did not conform to partitioning rules configured for the proxy server.
  7. Use idsldif2db, idsbulkload, or ldapadd command to load the data to the appropriate back-end server. You must load the correct LDIF file on the back-end server with the corresponding partition index value. Otherwise, the proxy server might not be able to retrieve the entries.
    Server1 (partition index 1) - sample_1.ldif
    Server2 (partition index 2) - sample_2.ldif 
    Server3 (partition index 3) - sample_3.ldif