Exit Print View

#### make-ldif

The make-ldif utility generates LDIF data based on a template file.

##### Synopsis

make-ldif options

##### Description

The make-ldif utility can be used to generate LDIF data based on a template file. The utility allows you to construct any amount of realistic sample data that is suitable for use in applications, such as performance and scalability testing, or to attempt to reproduce a problem observed in a production environment.

##### Options

The make-ldif utility accepts an option in either its short form (for example, -o ldifFile) or its long form equivalent (for example, --ldifFile ldifFile).

-o, --ldifFile ldifFile

Specify the path to the LDIF file to which the generated data should be written. This is a required option.

-s, --randomSeed seed

Specify the integer value that should be used to seed the random number generator. If a random seed is provided, then generating data based on the same template file with the same seed will always generate exactly the same LDIF output. If no seed is provided, then the same template file will likely generate different LDIF output each time it is used.

-t, --templateFile templateFile

Specify the path to the template file that describes the data to be generated. This is a required option. You must specify an absolute path to the template file.

-?, -H, --help

Display command-line usage information for the utility and exit without making any attempt to run the command.

-V, --version

Display the version information for the directory server.

##### Examples

The following examples show how to use the directory server commands. You can use the commands on any UNIX, Linux, or Windows system that has at least the Java SE 5 (at least Sun version 1.5.0_08, preferably the latest version of Java SE 6) runtime environment installed on its target system. See Directory Server System Requirements in Sun OpenDS Standard Edition 2.0 Installation Guide for more information.

###### Creating a Sample LDIF File

The following command creates an LDIF file using the template (-t), writes to an output file (-o), and specifies the random seed (-s). For Windows platforms, enter the file paths to your output LDIF file (for example, -o path\to\Example.ldif) and to your template file (for example, -t install-dir\config\MakeLDIF\example.template).

The example.template file is located in the install-dir/config/MakeLDIF directory.

$make-ldif -o /path/to/sample.ldif -s 0 \ -t install-dir/config/MakeLDIF/example.template Processed 1000 entries Processed 2000 entries Processed 3000 entries Processed 4000 entries Processed 5000 entries Processed 6000 entries Processed 7000 entries Processed 8000 entries Processed 9000 entries Processed 10000 entries LDIF processing complete. 10003 entries written ###### Example 123 ###### Creating a Large Sample LDIF File The example.template file (located in the installation directory under install-dir/config/MakeLDIF) contains a variable that sets the number of entries generated by the make-ldif tool. You can change the number to create a very large sample LDIF file for your tests. Open the example.template file, and change the numusers variable. By default, the variable is set to 10001. In this example, set the variable to 1000001: define suffix=dc=example,dc=com define maildomain=example.com define numusers=1000001 ... Rerun the make-ldif command: $ make-ldif -o /path/to/sample.ldif -s 0 \
-t install-dir/config/MakeLDIF/example.template
...
Processed 999000 entries
Processed 1000000 entries
LDIF processing complete.  1000003 entries written
##### Exit Codes

An exit code of 0 indicates that the operation completed successfully. An exit code of 1 indicates that an error occurred during processing.

##### Locations
• UNIX and Linux: install-dir/bin/make-ldif

• Windows: install-dir\bat\make-ldif.bat