View Single Post
  #10 (permalink)  
Old 09-16-2008, 02:30 PM
jsilence jsilence is offline
Junior Member
 
Posts: 5
Default Tried to recover following these instruction. No success.

I am having a corrupt LDAP Database due to a Server freeze last week.
Previously I enabled Replication using the zmldapenablereplica script, but I did not finish the replica server before the problems occured.

Right now I am in the situation where I can restore from an almost three week old backup which unfortunately becomes corrupt again after a while. This might be due to the fact that I upgraded from 5.0.6 to 5.0.9 after that backup. After a while I get errors like this and the admin interface can not change anything in the LDAP any more.

Code:
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): Ignoring log file: /opt/zimbra/openldap-data/logs/log.0000000191: magic number 0, not 40988 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): Invalid log file: log.0000000191: Invalid argument 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): First log record not found 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): PANIC: Invalid argument 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_open: Database cannot be recovered, err -30978. Restore from backup! 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): DB_ENV->lock_id_free interface requires an environment configured for the locking subsystem 
Sep  8 09:06:02 zimbra slapd[4207]: bdb(): txn_checkpoint interface requires an environment configured for the transaction subsystem 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_close: txn_checkpoint failed: Invalid argument (22) 
Sep  8 09:06:02 zimbra slapd[4207]: backend_startup_one: bi_db_open failed! (-30978) 
Sep  8 09:06:02 zimbra slapd[4207]: bdb_db_close: alock_close failed 
Sep  8 09:06:02 zimbra slapd[4207]: slapd stopped.
When I trie to recover following recipe #2 from the original poster, I get the following error:

Code:
zimbra@zimbra:~$ ~/openldap/sbin/slapadd -w -q -f ~/conf/slapd.conf -l /opt/zimbra/backup/ldap.bak                
The first database does not allow slapadd; using the first available one (2)
slapadd: empty dn="" (line=5)
greenrenault writes something about
Quote:
and you'll need to make sure you select the correct database when doing slapadd (The -b '' flag).
But I don't know whether that is related and if so, how to select the correct database.

Any help would be appreciated.

-jsl
Reply With Quote