Exit Print View

Sun OpenDS Standard Edition 2.2 Command-Line Usage Guide

Get PDF Book Print View
 

Document Information

Before You Start

Server Administration Commands

Data Administration Commands

backup

base64

dbtest

export-ldif

import-ldif

list-backends

manage-account

rebuild-index

restore

split-ldif

verify-index

LDAP Client Utilities Commands

Other Commands

General Tool Usage Information

split-ldif

The split-ldif command splits an LDIF file into multiple LDIF files according to a given distribution workflow element. The generated LDIF files are used to populate the partitions of a distribution deployment.

This command is not supported for the directory server.

Synopsis

split-ldif options

Description

The split-ldif command splits an LDIF file into multiple LDIF files according to a given distribution workflow element. The data in the LDIF file is split based on the attributes indicated and based on the distribution type defined. The generated LDIF files are used to populate the distribution partitions and can also be used for the global index initialization, if using a global index. The split-ldif command allows you to create separate LDIF files for different attributes.

These LDIF files are then used by to populate the global index catalog. For more information, see gicadm.

Options

The split-ldif command accepts an option in either its short form (for example, -i ldifFile) or its long form equivalent (for example, --ldifFile ldifFile).

-i, --ldifFile ldifFile

Name of the LDIF file to split.

-d, --distributionName distributionName

Name of the distribution workflow element to be used to split the data.

-l, --listDistributionNames

Lists the available distribution workflow elements from the directory server's configuration.

-o, --outputDirectory outputDirectory

The directory where output LDIF files will be generated.

-O, --outputFilenamePrefix outputFilePrefix

The prefix of the filename to generate (will contain the partition ID and the .ldif extension).

-f, --force

Overwrites generated files that may already exist from previous use.

Global Index Options
-n, --catalogName

The unique identifier of the global index catalog.

-s, --seperateIndexFiles

Splits the index entries into separate index files for each attribute listed.

-x, --index attributeTypeName

Generate an LDIF file for global index initialization for that attribute type.

General Options
-V, --version

Display the version information for the directory server.

-?, -H, --help

Display command-line usage information for the command and exit without making any attempt to stop or restart the directory server.

Examples
Example 87
Using split-ldif to Populate a Global Index with One Indexed Attribute

The following command uses an existing database file (-i) which it splits into several files, based on the distribution information already defined in the Sun OpenDS Standard Edition proxy deployment. The command defines the distribution workflow element name (-d), the database file (-i) to be split, the global index base DN (-n), and the attribute to be indexed in the global index LDIF file (-x). Indicating -f will overwrite any existing LDIF files.

You must have deployed a Sun OpenDS Standard Edition proxy with distribution before running this command.

$ split-ldif -d "distrib-we" -i database.ldif -x employeenumber -n "gi" -f

Assuming, for this example, that your distribution algorithm was numeric, and that you set two partitions with boundaries 1–1000 and 1000–2000. When you run the command above, the following LDIF files are created:

database-1.ldif

This file contains all the entries from database with employee numbers from 1–999, which will be used to populate partition 1.

database-2.ldif

This file contains all the entries from database with employee numbers from 1000–1999, which will be used to populate partition 2.

database-gi.ldif

This file contains a mapping between the entries from database and the distribution partition where the information is stored. This file is used to populate the global index.

Example 88
Using split-ldif to Populate a Global Index with Several Indexed Attributes

The following command uses an existing database file (-i) which it splits into several files, based on the distribution information already defined in the Sun OpenDS Standard Edition proxy deployment. The command defines the distribution workflow element name (-d), the database file (-i) to be split, the global index base DN (-n), and the attributes to be indexed in the global index LDIF file (-x). Indicating -s creates separate files for each attribute indexed. Indicating -f will overwrite any existing LDIF files.

You must have deployed a Sun OpenDS Standard Edition proxy with distribution before running this command.

$ split-ldif -d "distrib-we" -i database.ldif \
  -x employeenumber -x uid -n "gi" -f -s

Assuming, for this example, that your distribution algorithm was numeric, and that you set two partitions with boundaries 1–50000 and 50000–100001. When you run the command above, the following LDIF files are created:

database-1.ldif

This file contains all the entries from database with employee numbers from 1–49999, which will be used to populate partition 1.

database-2.ldif

This file contains all the entries from database with employee numbers from 50000–100000, which will be used to populate partition 2.

database-gi-employeenumber.ldif

This file contains a mapping between the employee numbers and the distribution partition where the information is stored. This file is used to populate the global index.

database-gi-uid.ldif

This file contains a mapping between the uid numbers and the partition where the information is stored. This file is used to populate the global index.

Location
Related Commands

gicadm