Previous Topic: DXdisp Tool—Set the Update Time for Multiwrite-DISP Replications

Next Topic: DXemptydb Tool—Delete All Data from a Datastore

DXdumpdb Tool—Export Data from a Datastore to an LDIF File

Use the DXdumpdb tool to export data from a datastore to an LDIF file.

Note: For a list of the status codes returned by all the DXtools commands, including this command, see Exit Status Codes for the DXtools.

This command has the following format:

dxdumpdb options DSA
options

Denotes one or more of the following options:

-f filename

Specifies the file to receive the exported data. If this option is not specified, the output goes to standard output or the screen.

-i attribute-list

Includes the listed attributes in the dump file.

Note: The attributes specified with the -i option must include the naming attributes. If the attributes are not specified, then the tool does not dump the entries. In addition, the must-contain attributes must also be specified if the output is intended to be used with DXloaddb again.

-v

Runs in verbose mode. This option switches on error and status tracing. For the -v option to work, you must also specify the -f option.

-x

Excludes the listed attributes from the dump file.

Note: You should not exclude attributes that form part of the DN.

-z

Specifies that DXdumpdb dumps from the copy of the datastore that is produced by the console command dump dxgrid-db.

DSA

Defines the DSA. DXdumpdb looks in the configuration files of this DSA to find the datastore to export to an LDIF file.

Example: Extract Democorp Data to Screen

The following example prints the LDIF format data from the datastore of the democorp DSA to the screen:

dxdumpdb democorp

Examples: Extract Democorp Data to a file specifying attributes

dxdumpdb -f dump.ldif -i cn,title democorp

This command fails because the naming attribute ou is missing.

dxdumpdb -f dump.ldif -i cn,ou,title democorp

This command works,  but the output cannot be loaded back into democorp with DXloaddb because the must-contain sn attribute is missing.

dxdumpdb -f dump.ldif -i sn,cn,ou,title democorp

This command works and the generated output file can be loaded into democorp again because the output file contains all the name attributes and must-contain attributes.