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.
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. - 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
, andou=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 serversou=raleigh,o=sample
- three back-end serversou=poughkeepsie,o=sample
- four back-end servers
- 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
- Run the ddsetup command to split the data.
where, proxy_instance is a proxy server instance.ddsetup –I proxy_instance -B "o=sample" -i mydata.ldif
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.
- 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.
- Create a proxy server instance. Run the idsicrt command,
for example:
where,idsicrt -I proxy_instance -x -l instance_location -G idsldap -w proxyPW
- 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
- Configure
o=sample
as a partition base on the proxy server. Run the idscfgsuf command, for example:
where,idscfgsuf -I proxy_instance -s o=sample
- proxy_instance is the proxy server instance name
o=sample
is the configured partition base with the proxy server
- Set the administrator DN and password for the proxy server instance.
Run the idsdnpw command, for example:
where,idsdnpw -I proxy_instance -u cn=root -p rootPWD
- proxy_instance is the proxy server instance name
cn=root
is the administrator DNrootPWD
is the administrator password
- Start the proxy server instance in configuration-only mode. Run
the ibmslapd command, for example:
where, proxy_instance is the proxy server instance nameibmslapd -I proxy_instance -a
- Add the configuration for splitting
o=sample
into three partitions. Run the ldapadd command, for example:
where,ldapadd -D cn=root -w rootPWD -p port -f ddibmslapd.conf
cn=root
is the administrator DNrootPWD
is the administrator password- port is the port number on which the proxy server is listening
- ddibmslapd.conf is the sample configuration file
- To split the LDIF file, run ddsetup with the
sample data.
where,ddsetup -I proxy_instance -B o=sample -i ddsample.ldif
- proxy_instance is the proxy server instance
o=sample
is the partition base- ddsample.ldif is the sample LDIF file
The default.ldif file contains all the entries that did not conform to partitioning rules configured for the proxy server.sample_1.ldif sample_2.ldif sample_3.ldif default.ldif
- 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
- Create a proxy server instance. Run the idsicrt command,
for example: