0

I have exported my database using the following function slapcat > ldif

While I am importing database in other LDAP server it creates error. I am using the following function slapadd -l ldif.

This creates the following error

560d7819 The first database does not allow slapadd; using the first available one (2)
560d7819 => hdb_tool_entry_put: id2entry_add failed: BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
560d7819 => hdb_tool_entry_put: txn_aborted! BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
slapadd: could not add entry dn="dc=dmdomain,dc=com" (line=1): txn_aborted! BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
_#####                 26.09% eta   none elapsed            none spd 957.4 k/s 
Closing DB...

What should I do??

Shahrukh Khan
  • 201
  • 2
  • 5
  • 10

1 Answers1

1

Your LDAP database is not empty. Id what you are trying to do is migrate to a new machine, please read on. If you're trying to add more from previous database to already populated database on new machine please stop.

if you slapcat your new server you'll get your your

dc=dmdomain,dc=com 

as an entry. What I suggest you do (please use snapshot or other method to make sure you can recover from any other error before doing this).

delete all content from /etc/ldap/slapd.d. This will make a clean slate on your ldap.

slapadd -l file location

J_LDAP
  • 588
  • 1
  • 4
  • 11