Well, I finally found out the answers to my own questions. For
posterity's sake, I figure I will go ahead and post the answer online
here, in case somebody else somewhere down the line also needs the
answer to this same question:

In iPlanet Directory Server 5.0, if you want to do a full export of
the entire LDAP database, then the following basic syntax will
suffice, assuming that you are using the default database that is
created for you:

db2ldif -n userRoot

The exact command, if entered above, will export the LDAP database
into an LDIF file into the current directory with a filename that
corresponds to the current date and time.

The -n parameter refers to the name of the database that is being used
to store the LDAP data in binary format. This can actually be found in
the iPlanet Console under the "Configuration" tab and then the "Data"
expandable tree. By default, the database is named "userRoot".

Therefore, you could automate a nightly export of your LDAP data into
LDIF format by adding the following to cron (on UNIX) or AT (on
WinNT):

<server_path>/db2ldif -n userRoot -a <path_to_new_ldif_file>

Now the above is the syntax for doing a full export.
I didn't bother to test out how to do an export of a subtree.
When I ever come across the need to do that and I figure out the
syntax for that, I'll try and post that here someday. USENET's been
around for 20+ years, what the heck? Maybe somebody a couple of years
from now will read this post via Google Groups and be looking for this
exact same info.

- Hyder Khan -

[EMAIL PROTECTED] (Hyder Khan) wrote in message 
news:<[EMAIL PROTECTED]>...
> Greetings fellow LDAPpers!
> 
> Here is iPlanet's official documentation on the use of the db2ldif
> command utlity for iPlanet Directory Server 5.0. (I'm using WinNT but
> I'm sure that UNIX users could benefit / contribute by participating
> in this thread:
> 
> http://docs.iplanet.com/docs/manuals/directory/50/html/cli/scripts.htm#23620
> 
> However, is it just me being clueless or does the documentation never
> provide any EXAMPLES on HOW to use this command? I have no idea what
> the command is looking for in terms of the '-n' or the '-s' parameter.
> 
> Can anyone please provide any concrete examples of the proper syntax?
> 
> 1) I'm trying to export EVERYTHING from LDAP into an LDIF file.
> 
> 2) I would also like to know how to export only a SUBTREE from LDAP to
> LDIF.
> (eg- ou=myorganizationalunit,o=myorganization,c=us)
> 
> Thanks!
> Hyder Khan

Reply via email to