[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Failure while importing an exported ldif file
--On Thursday, December 01, 2011 10:38 PM +0100 Axel Birndt
<towerlexa@gmx.de> wrote:
Hi @All,
now while my ldapserver is working on my testmachine, i'am trying to
import my ldif files.
I read the thread
http://www.openldap.org/lists/openldap-software/200711/msg00069.html
but the import isn't working for me.
I'm not surprised. See why below:
abirndt@lvps83-169-33-218:~/openldap_2axels-company$ sudo slapadd -F
/etc/ldap/slapd.d -n 0 -l dc_2axels-company_dc_de_export.ldif
slapadd: line 1: database (cn=config) not configured to hold
"dc=2axels-company,dc=de"
slapadd: line 1: database (cn=config) not configured to hold
"dc=2axels-company,dc=de"
abirndt@lvps83-169-33-218:~/openldap_2axels-company$ sudo slapadd -F
/etc/ldap/slapd.d -n 0 -l cn_config_export.ldif
I created my backupfiles with the following commands:
sudo slapcat -b cn=config -F /etc/ldap/slapd.d/ >cn_Config_export.ldif
sudo slapcat -b dc=2axels-company,dc=de -F /etc/ldap/slapd.d/
>dc_2axels-company_dc_de_export.ldif
So you exported your primary (NOT CONFIG) database into
dc_2axels-company_dc_de_export.ldif.
You exported your config database into cn_Config_export.ldif
Yet you are trying to *slapadd* your primary database into the cn=config
database. Why are you surprised this doesn't work?
Also, you need to import the config first. So your first slapadd command
should be:
sudo slapadd -F /etc/ldap/slapd.d -n 0 -l cn_config_export.ldif
to import the config database.
Then you need to import your primary db:
sudo slapadd -F /etc/ldap/slapd.d -b "dc=2axels-company,dc=de" -l
dc_2axels-company_dc_de_export.ldif
For slapadd, -n 0 has very specific meaning -- It is for the cn=config db
only.
--Quanah
--
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration