HP UX Red Hat Direry Server Software manual Run the db2ldif command-line script

Models: UX Red Hat Direry Server Software

1 638
Download 638 pages 23.73 Kb
Page 143
Image 143

Console

2.Run the db2ldif command-line script.

db2ldif -n database1 -a /export/output.ldif

This exports the database contents to /export/output.ldif. If the -aoption is not specified, then the database information is exported to

/var/lib/dirsrv/slapd-instance_name/ldif/instance_name-database1-date.ldif. For example:

db2ldif -n database1

It is also possible to specify which suffixes to export, using the -soption. For example:

db2ldif -s "dc=example,dc=com"

The LDIF file in this case would be

/var/lib/dirsrv/slapd-instance_name/ldif/instance_name-example-2007_04_30_112718.ldif, using the name of the suffix rather than the database.

If the suffix specified is a root suffix, such as dc=example,dc=com, then it is not necessary to specify the database or to use the -noption.

For more information about using this script, see the Directory Server Configuration, Command, and File Reference.

Option

-n

-s

-a

Description

Specifies the name of the database from which the file is being exported.

Specifies the suffix or suffixes to include in the export. If the suffix is a root suffix, such as dc=example,dc=com, then the -noption is not required. There can be multiple -sarguments.

Defines the output file to which Directory Server exports the LDIF. This file must be an absolute path. If the -aoption is not given, the output ldif is stored in the the

/var/lib/dirsrv/slapd-instance_name/ldif

directory and is automatically named

serverID-database-YYYY_MM_DD_hhmmxx.ldif

with the -noption or

123

Page 143
Image 143
HP UX Red Hat Direry Server Software manual Run the db2ldif command-line script, Ldif file in this case would be