1DB2LDIF.PL(8) System Manager's Manual DB2LDIF.PL(8)
2
3
4
6 db2ldif.pl - Directory Server perl script for exporting a database to a
7 LDIF file
8
10 db2ldif.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j pwfile‐
11 name } [-P protocol] {-n backendname}* | {-s includeSuffix}* [{-x
12 excludeSuffix}*] [-m] [-M] [-r] [-u] [-C] [-N] [-E] [-1] [-U] [-a file‐
13 name] [-h]
14
16 Exports the contents of the database to LDIF. This script creates an
17 entry in the directory that launches this dynamic task.
18
20 A summary of options is included below:
21
22 -Z Server Identifier
23 The server ID of the Directory Server instance. If there is
24 only one instance on the system, this option can be skipped.
25
26 -D Root DN
27 The Directory Manager DN, or root DN. If not specified, the
28 script will search the server instance configuration for the
29 value.
30
31 -w password
32 The rootdn password.
33
34 -w -
35 Prompt for the rootdn password.
36
37 -j password filename
38 The name of the file that contains the root DN password.
39
40 -n Backend Name
41 The name of the LDBM database to restore. Example: userRoot
42
43 -s includeSuffix
44 The suffix DN to be included in the exported LDIF file.
45
46 -x excludeSuffix
47 The suffix DN to be excluded from the exported LDIF file.
48
49 -a filename
50 Name for the exported LDIF file.
51
52 -P Protocol
53 The connection protocol to connect to the Directory Server.
54 Protocols are STARTTLS, LDAPS, LDAPI, and LDAP. If this option
55 is skipped, the most secure protocol that is available is used.
56 For LDAPI, AUTOBIND is also available for the root user.
57
58 -m
59 Minimize the base64 encodings in the exported LDIF file.
60
61 -M
62 Exported ldif is stored in multiple files. These files are named
63 : <instance>_<filename>
64 By default, all instances are stored in the filename specified
65 by the -a option.
66
67 -r
68 Export replication data(information required to initialize a
69 replica when the LDIF is imported).
70
71 -u
72 Do not export the unique-id attribute.
73
74 -U
75 Requests that the output LDIF is not folded.
76
77 -C
78 Uses only the main database file.
79
80 -N
81 Suppress printing sequential number
82
83 -E
84 Decrypts any encrypted data during export.
85
86 -1
87 Deletes, for reasons of backward compatibility, the first line
88 of the LDIF file that gives the version of the LDIF standard.
89
90 -h
91 Display usage
92
94 db2ldif.pl -Z instance3 -n userRoot -a /LDAP/ldif/export.ldif -P START‐
95 TLS
96
97 Note: security must be enabled to use protocol STARTTLS. If
98 STARTTLS is not available it will default to next strong‐
99 est/available protocol automatically.
100
101 db2ldif.pl -s 'dc=example,dc=com' -a /LDAP/ldif/export.ldif -m -E -q
102
104 Exit status is zero if no errors occur. Errors result in a non-zero
105 exit status and a diagnostic message being written to standard error.
106
108 db2ldif.pl was written by the 389 Project.
109
111 Report bugs to https://pagure.io/389-ds-base/new_issue
112
114 Copyright © 2017 Red Hat, Inc.
115
116
117
118 March 31, 2017 DB2LDIF.PL(8)