Exporting to LDIF from the Command-Line
103
2. Expand the
Data
tree in the left navigation pane. Expand the suffix, and select the database under
the suffix.
3. Right-click the database, and select
Export Database
.
Alterntaively, select
Export Database
from the
Object
menu.
The
Export Partition
dialog box opens.
4. In the
LDIF file
field, enter the full path to the LDIF file, or click
Browse
.
When the
Browse
button is not enabled, the file is stored in the default directory,
/var/lib/
dirsrv/slapd-
instance_name
/ldif
.
1
5. Click
OK
to export the file.
4.2.3. Exporting to LDIF from the Command-Line
Databases can be exported to LDIF using the
db2ldif
command-line script. This script exports all of
the database contents or a part of their contents to LDIF when the server is running or stopped.
NOTE
To export a database that has been encrypted, you must use the
-E
option with the
script. See
Section 3.2.3.5, “Exporting and Importing an Encrypted Database”
for more
information.
NOTE
If the database being exported is a replica, then the server must be stopped before the
export script is run and the export script must have the
-r
.
To export to LDIF from the command-line, do the following:
1. Open the Directory Server instance directory:
cd /usr/lib/dirsrv/slapd-
instance_name
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
-a
option 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
-s
option. For example:
db2ldif -s "dc=example,dc=com"
Summary of Contents for DIRECTORY SERVER 8.0
Page 18: ...xviii ...
Page 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Page 30: ...12 ...
Page 112: ...94 ...
Page 128: ...110 ...
Page 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Page 224: ...206 ...
Page 324: ...306 ...
Page 334: ...316 ...
Page 358: ...340 ...
Page 410: ...392 ...
Page 420: ...402 ...
Page 444: ...426 ...
Page 454: ...436 ...
Page 464: ...446 ...
Page 484: ...466 ...
Page 512: ...494 ...
Page 522: ...504 ...