corrupt data.mdb

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Konstantin
Posts: 4
Joined: Mon Feb 04, 2019 1:16 pm

corrupt data.mdb

Postby Konstantin » Fri Mar 05, 2021 11:34 am

Hi list,

following the hanged server, zimbra is unable to start anymore
It seems that the data.mdb got corrupted.

Starting ldap...Done.
Failed.
Failed to start slapd. Attempting debug start to determine error.
604216a0 mdb_db_open: database "": mdb_dbi_open(/opt/zimbra/data/ldap/mdb/db/id2e) failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782).
604216a0 backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (-30782)


Tried running
$ /opt/zimbra/libexec/zmslapcat /opt/zimbra/store/LDAP/
604215d6 mdb_db_open: database "": mdb_dbi_open(/opt/zimbra/data/ldap/mdb/db/id2e) failed: MDB_BAD_TXN: Transaction must abort, has a child, or is invalid (-30782).
604215d6 backend_startup_one (type=mdb, suffix=""): bi_db_open failed! (-30782)
slap_startup failed

Any suggestions on how to recover the ?


User avatar
L. Mark Stone
Elite member
Elite member
Posts: 2226
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 8.8.15 Network Edition
Contact:

Re: corrupt data.mdb

Postby L. Mark Stone » Fri Mar 05, 2021 2:23 pm

I would recommend restoring LDAP from a backup.

https://wiki.zimbra.com/wiki/LDAP_data_import_export

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
Zeta Alliance http://www.zetalliance.org/
Konstantin
Posts: 4
Joined: Mon Feb 04, 2019 1:16 pm

Re: corrupt data.mdb

Postby Konstantin » Fri Mar 05, 2021 4:14 pm

Thanks, thats the first thing I have looked at, but... there is always but...

The problem is that the /opt/zimbra was moved to a different disk, and that wasnt included in the daily backup snapshots of the cloudstack. :( so I only have the backup of data.mdb from Nov 2019

I have zextras suite on this server, but I ant seem to find the data.mdb file in their backup scheme. There is no (ldap/ldap.bak.gz or ldap/ldap-config.bak.gz)

Is there a way to repair data.mdk ?
User avatar
L. Mark Stone
Elite member
Elite member
Posts: 2226
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 8.8.15 Network Edition
Contact:

Re: corrupt data.mdb

Postby L. Mark Stone » Fri Mar 05, 2021 5:03 pm

Konstantin wrote:Thanks, thats the first thing I have looked at, but... there is always but...

The problem is that the /opt/zimbra was moved to a different disk, and that wasnt included in the daily backup snapshots of the cloudstack. :( so I only have the backup of data.mdb from Nov 2019

I have zextras suite on this server, but I ant seem to find the data.mdb file in their backup scheme. There is no (ldap/ldap.bak.gz or ldap/ldap-config.bak.gz)

Is there a way to repair data.mdk ?


If your backup directory is /opt/zimbra/backup, then there will be several "ldap_dd_mm_yy*.tar.gz" files in the "server" subdirectory. Inside each tar.gz file you will find ldap.ldif, ldap-schema.ldif and ldap-config.ldif, which you can use to restore LDAP. In my experience, LDAP is typically not repairable. Restorable, yes; repairable not generally.

Hope that helps,
Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
Zeta Alliance http://www.zetalliance.org/
Konstantin
Posts: 4
Joined: Mon Feb 04, 2019 1:16 pm

Re: corrupt data.mdb

Postby Konstantin » Mon Mar 08, 2021 7:47 am

Thanks Mark,
looking for the ldap backup files was the first thing i did, but for some reason is not being backuped up by default. I have two servers with zextras, so was very surprised that eventhough the manual says

++++++
LDAP is automatically backed up nightly after the scheduled SmartScan on every mailbox server, or can be manually backed up by using the zxsuite backup doBackupLDAP command:

LDAP Backup Configuration
The ldapDumpEnabled server attribute controls whether LDAP is backed up during the SmartScan. By default, this attribute is set to true.
++++++

I had no ldap backup on both servers.

So wrote a script to backup data.mdb using zmslapcat, also dumping sql dbase just in case, in addition to making daily snapshots.
p.s. solved by reverting to the data.mdb from 18 months ago :( thankfully not so many changes were done.
Klug
Elite member
Elite member
Posts: 2421
Joined: Mon Dec 16, 2013 11:35 am
Contact:

Re: corrupt data.mdb

Postby Klug » Sun Apr 04, 2021 3:03 pm

Are you using Zimbra NE or Zimbra OSE + ZeXtras?

The LDAP backup feature is included in ZeXtras. But not enabled.
I learnt it the worse possible way.

Return to “Administrators”

Who is online

Users browsing this forum: Bing [Bot] and 22 guests