Ripe out EDB->LDIF cruft

Ripe out ldif2... cruft
LDBM database format should be moved to a separate 'SLAPD internals' guide
This commit is contained in:
Kurt Zeilenga 2000-07-28 20:40:48 +00:00
parent c6e498f5da
commit 89686da482

View File

@ -253,39 +253,6 @@ You can use the ldbmcat program to create a suitable LDIF
input file from an existing LDBM database.
H3: The {{EX: ldif2id2entry}} program
The {{EX: ldif2id2entry}} program is normally invoked from {{EX: ldif2ldbm}}.
It is used to convert an LDIF text file into an {{EX: id2entry}} index.
It is unlikely that you would need to invoke it yourself, but if
you do it works like this
E: ldif2id2entry -i <inputfile> -f <slapdconfigfile>
E: [-d <debuglevel>] [-n <databasenumber>]
The arguments are the same as for the {{EX: ldif2ldbm}} program.
H3: The {{EX: ldif2id2children}} program
The {{EX: ldif2id2children}} program is normally invoked from
{{EX: ldif2ldbm}}. It is used to convert an LDIF text file into
{{EX: id2children}} and {{EX: dn2id}} indexes. Occasionally, it may be
necessary to run this program yourself, for example if one of
these indexes has become corrupted. {{EX: ldif2id2children}} is
invoked like this
E: ldif2id2children -i <inputfile> -f <slapdconfigfile>
E: [-d <debuglevel>] [-n <databasenumber>]
The arguments are the same as for the {{EX: ldif2ldbm}} program.
You can use the ldbmcat program to create a suitable LDIF
input file from an existing LDBM database.
H3: The {{EX: ldbmcat}} program
The {{EX: ldbmcat}} program is used to convert an {{EX: id2entry}} index
@ -378,7 +345,6 @@ E: cn: Babs Jensen
E: objectclass: person
E: sn: Jensen
E:
E:
E: dn: cn=Bjorn J Jensen, dc=OpenLDAP, dc=org
E: cn: Bjorn J Jensen
E: cn: Bjorn Jensen
@ -405,207 +371,6 @@ LDIF file. Nor are multiple internal spaces compressed. If
you don't want them in your data, don't put them there.
H2: Converting from QUIPU EDB format to LDIF format
If you have directory data that is or was held in a QUIPU
DSA (available as part of the ISODE package), you will want
to convert the EDB files used by QUIPU into an LDIF file.
The edb2ldif program is provided to do most of the
conversion for you. Once you have an LDIF file, you should
follow the steps outlined in section 6.2 above to build an
LDBM database for slapd.
H3: The {{EX: edb2ldif}} program
The edb2ldif program is invoked like this:
E: edb2ldif [-d] [-v] [-r] [-o] [-b <basedn>]
E: [-a <addvalsfile>] [-f <fileattrdir>]
E: [-i <ignoreattr...>] [<edbfile...>]
The LDIF data is written to standard output. The arguments
have the following meanings:
E: -d
This option enables some debugging output on standard
error.
E: -v
Enable verbose mode that writes status information to
standard error, such as which EDB file is being processed,
how many entries have been converted so far, etc.
E: -r
Recurse through child directories, processing all EDB files
found.
E: -o
Cause local .add file definitions to override the global addfile
(see -a below)
E: -b <basedn>
Specify the Distinguished Name that all EDB file entries
appear below.
E: -a <addvalsfile>
The LDIF information contained in this file will be appended
to each entry.
E: -f <fileattrdir>
Specify a single directory where all file-based attributes
(typically sounds and images) can be found. If this option is
not given, file attributes are assumed to be located in the
same directory as the EDB file that refers to them.
E: -i <ignoreattr>
Specify an attribute that should not be converted. You can
include as many -i flags as necessary.
E: <edbfile>
Specify a particular EDB file (or files) to read data from. By
default, the EDB.root (if it exists) and EDB files in the current
directory are used.
When {{EX: edb2ldif}} is invoked, it will also look for files named
.add in the directories where EDB files are found and append
the contents of the .add file to each entry. Typically, this
feature is used to include inherited attribute values (e.g.,
{{EX: objectClass}}) that do not appear in the EDB files.
H3: Step-by-step EDB to LDIF conversion
The basic steps to follow when converting your EDB format
data to an LDIF file are:
^ Locate the directory at the top of the EDB file hierarchy
that your QUIPU DSA masters. The EDB file located there
should contain the entries for the first level of your
organization or organizational unit. If you are using an
indexed database with QUIPU, you may need to create EDB
files from your index files (using the synctree or qb2edb
tools).
+ If you do not have a file named EDB.root in the same
directory that contains your organizational or organizational
unit entry, create it now by hand. Its contents should look
something like this:
.{{EX: MASTER}}
.{{EX: 000001}}
.{{EX: }}
.{{EX: o=OpenLDAP}}
.{{EX: objectClass= top & organization & domainRelatedObject &\}}
.{{EX: quipuObject & quipuNonLeafObject}}
.{{EX: l= Redwood City, California}}
.{{EX: st= California}}
.{{EX: o=OpenLDAP Project & OpenLDAP Foundation & OpenLDAP}}
.{{EX: description=The OpenLDAP Project}}
.{{EX: associatedDomain= openldap.org}}
.{{EX: masterDSA= c=US@cn=Woolly Monkey}}
.{{EX: }}
+ (Optional) Create a global add file and/or local .add files to
take care of adding any attribute values that do not appear in
the EDB files. For example, if all entries in a particular EDB
are person entries and you want to add the appropriate
objectClass attribute value for them, create a file called .add
in the same directory as the person EDB that contains the
single line:
.{{EX: objectClass: person }}
+ Run the edb2ldif program to do the actual conversion.
Make sure you are in the directory that contains the root of
the EDB hierarchy (the one where the EDB.root file resides).
Include a -b flag with a base DN one level above your
organizational entry, and include -i flags to ignore any
attributes that are not useful to slapd. E.g., the command:
.{{EX: edb2ldif -v -r -b "c=US" -i iattr -i acl -i xacl -i sacl}}
.{{EX: -i lacl -i masterDSA -i slaveDSA > ldif}}
will convert the entire EDB hierarchy to LDIF format and
write the result to a file named ldif. Some attributes that are
not useful when running slapd are ignored. The EDB
hierarchy is assumed to reside logically below the base DN
"c=US".
+ Follow the steps outlined in section 8.2 above to produce
an LDBM database from your new LDIF file.
H2: The ldbmtest program
Occasionally you may find it useful to look at the LDBM
database and index files directly (i.e., without going through
slapd). The {{EX: ldbmtest}} program is provided for this purpose. It
gives you raw access to the database itself. {{EX: ldbmtest}} should
be run line this:
E: ldbmtest [-d <debuglevel>] [-f <slapdconfigfile>]
The default configuration file in the {{EX: ETCDIR}} is used if you
don't supply one. By default, ldbmtest operates on the last
database listed in the config file. You can specify an
alternate database, or see the current database with the
following commands.
E: b specify an alternate backend database
E: B print out the current backend database
The {{EX: b}} command will prompt you for the suffix associated with
the database you want. The database you select can be
viewed and modified using a set of two-letter commands.
The first letter selects the command function to perform.
Possible commands and their meanings are as follows.
E: l lookup (do not follow indirection)
E: L lookup (follow indirection)
E: t traverse and print keys and data
E: T traverse and print keys only
E: x delete an index item
E: e edit an index item
E: a add an index item
E: c create an index file
E: i insert an entry into an index item
The second letter indicates which index the command
applies to. The possible index selections are as follows.
E: c id2children index
E: d dn2id index
E: e id2entry index
E: f arbitrary file name
E: i attribute index
Each command may require additional arguments which
ldbmtest will prompt you for.
To exit {{EX: ldbmtest}}, type {{EX: control-D}} or {{EX: control-C}}.
Note that this is a very raw interface originally developed
when testing the database format. It is provided and
minimally documented here for interested parties, but it is not
meant to be used by the inexperienced. See the next section
for a brief description of the LDBM database format.
H2: The LDBM database format