--On Thursday, December 13, 2018 7:03 PM +0000 Eggo why eggo@hotmail.com wrote:
[ldap@ip-10-92-164-27 ~]$ slapadd -f data.ldif
5c12a90f data.ldif: line 1: unknown directive dn: outside backend info and database definitions.
slapadd: bad configuration file!
Read the man page for slapadd. "-f" is clearly documented as taking a configuration file, not a database in LDIF format.
[ldap@ip-10-92-164-27 ~]$ slapadd -l /home/ldap/data.ldif
5c12a94f bdb_monitor_db_open: monitoring disabled; configure monitor database to enable
5c12a94f => bdb_tool_entry_put: id2entry_add failed: BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
5c12a94f => bdb_tool_entry_put: txn_aborted! BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
slapadd: could not add entry dn="dc=cornell,dc=edu" (line=1): txn_aborted! BDB0067 DB_KEYEXIST: Key/data pair already exists (-30994)
The above indicates you failed to remove the existing database prior to restoring from backup. You cannot overwrite an existind database.
Additionally, you still appear to be using either the depcreated back-bdb or back-hdb database backend. As I noted in my very first response you should be using back-mdb.
Overally, I would advise reading the man pages for the slapcat and slapadd utilities, as you're clearly missing options (such as -b) as well.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com