Skip Navigation Links | |
Exit Print View | |
Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory 11g Release 1 (11.1.1) |
The make-ldif command generates LDIF data based on a template file.
make-ldif [options]
The make-ldif command can be used to generate LDIF data based on a template file. The command 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.
The make-ldif command accepts an option in either its short form (for example, -o ldifFile) or its long form equivalent (for example, --ldifFile ldifFile).
Specify the path to the LDIF file to which the generated data should be written. This is a required option.
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.
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.
Display command-line usage information for the command and exit without making any attempt to run the command.
Display the version information for the directory server.
The following examples show how to use the directory server commands. See System Requirements and Certification in Oracle Fusion Middleware Installation Guide for Oracle Unified Directory for more information.
Example 4-14 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 4-15 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 command. 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
An exit code of 0 indicates that the operation completed successfully. An exit code of 1 indicates that an error occurred during processing.
UNIX and Linux: instance-dir/OUD/bin/make-ldif
Windows: instance-dir\OUD\bat\make-ldif.bat