Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Migration

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-22-2011, 01:46 AM
Intermediate Member
 
Posts: 18
Unhappy Lifting machine backup

I have a zimbra in production and running.
zmcontrol status> runing ok

Prepare another machine with the same name but a different ip.
To maintain the directory / opt / zimbra sync with rsync and have a backup.
With a local dns bind set to the name resolution is correct for this equipment.

Perform to install zimbra on the same version.
After installation and I stop zimbra mv / opt / zimbra / opt / zimbra.viejo
and put in place a production copy of zimbra

Code:
Starting ldap...Done.
Failed.
Failed to start slapd.  Attempting debug start to determine error.
hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22).
backend_startup_one: bi_db_open failed! (22)
bdb_db_close: database "": alock_close failed
/var/log/zimbra.log
Code:
Aug 22 09:42:54 zimbra zimbramon[31313]: 31313:info: Starting services initiated by zmcontrol 
Aug 22 09:42:54 zimbra slapd[31357]: @(#) $OpenLDAP: slapd 2.4.17 (Aug  2 2009 16:12:41) $     build@build11.lab.zimbra.com:/home/build/p4/main/ThirdParty/openldap/openldap-2.4.17.8z/servers/slapd 
Aug 22 09:42:54 zimbra slapd[31358]: bdb(): file id2entry.bdb has LSN 3/8231503, past end of log at 3/8156714 
Aug 22 09:42:54 zimbra slapd[31358]: bdb(): Commonly caused by moving a database from one database environment 
Aug 22 09:42:54 zimbra slapd[31358]: bdb(): to another without clearing the database LSNs, or by removing all of 
Aug 22 09:42:54 zimbra slapd[31358]: bdb(): the log files from a database environment 
Aug 22 09:42:54 zimbra slapd[31358]: bdb(): /opt/zimbra/data/ldap/hdb/db/id2entry.bdb: unexpected file type or format 
Aug 22 09:42:54 zimbra slapd[31358]: hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22). 
Aug 22 09:42:54 zimbra slapd[31358]: backend_startup_one: bi_db_open failed! (22) 
Aug 22 09:42:54 zimbra slapd[31358]: bdb_db_close: database "": alock_close failed 
Aug 22 09:42:54 zimbra slapd[31358]: slapd stopped. 
Aug 22 09:42:58 zimbra zimbramon[27757]: 27757:info: zmmtaconfig: Skipping Global system configuration update. 
Aug 22 09:42:58 zimbra zimbramon[27757]: 27757:info: zmmtaconfig: gacf ERROR: service.FAILURE (system failure: ZimbraLdapContext) (cause: javax.naming.CommunicationException zimbra.grupohd.com:389)  
Aug 22 09:42:59 zimbra slapd[31709]: @(#) $OpenLDAP: slapd 2.4.17 (Aug  2 2009 16:12:41) $     build@build11.lab.zimbra.com:/home/build/p4/main/ThirdParty/openldap/openldap-2.4.17.8z/servers/slapd 
Aug 22 09:43:00 zimbra slapd[31734]: bdb(): file id2entry.bdb has LSN 3/8231503, past end of log at 3/8158347 
Aug 22 09:43:00 zimbra slapd[31734]: bdb(): Commonly caused by moving a database from one database environment 
Aug 22 09:43:00 zimbra slapd[31734]: bdb(): to another without clearing the database LSNs, or by removing all of 
Aug 22 09:43:00 zimbra slapd[31734]: bdb(): the log files from a database environment 
Aug 22 09:43:00 zimbra slapd[31734]: bdb(): /opt/zimbra/data/ldap/hdb/db/id2entry.bdb: unexpected file type or format 
Aug 22 09:43:00 zimbra slapd[31734]: hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22). 
Aug 22 09:43:00 zimbra slapd[31734]: backend_startup_one: bi_db_open failed! (22) 
Aug 22 09:43:00 zimbra slapd[31734]: bdb_db_close: database "": alock_close failed 
Aug 22 09:43:00 zimbra slapd[31734]: slapd stopped.
Reply With Quote
  #2 (permalink)  
Old 08-22-2011, 03:04 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

Quote:
Originally Posted by showmanchoyin View Post
I have a zimbra in production and running.
zmcontrol status> runing ok

Prepare another machine with the same name but a different ip.
To maintain the directory / opt / zimbra sync with rsync and have a backup.
With a local dns bind set to the name resolution is correct for this equipment.
What is it you're trying to achieve with this process? If you're trying to move Zimbra to a new server, have you read the wiki/blog (and forum threads) articles on the subject?
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 08-22-2011, 03:21 AM
Intermediate Member
 
Posts: 18
Default

I'm trying to have two identical machines running simultaneously and synchronizing /opt/zimbra rsync.
Each machine resolved locally bind.

The second machine was accurate to the first installation, and works perfectly.
Until I stop zimbra, and I put / opt / zimbra of the first machine.
The error that I describe.

phoenix thanks for coming to my rescue again.
Reply With Quote
  #4 (permalink)  
Old 08-22-2011, 03:29 AM
Zimbra Consultant & Moderator
 
Posts: 20,319
Default

Quote:
Originally Posted by showmanchoyin View Post
I'm trying to have two identical machines running simultaneously and synchronizing /opt/zimbra rsync.
Each machine resolved locally bind.
You can't do that, for High Availability you'd need to run something like DRBD (search the forums for DRBD).
__________________
Regards


Bill
Reply With Quote
  #5 (permalink)  
Old 08-22-2011, 03:37 AM
Intermediate Member
 
Posts: 18
Default

Quote:
Originally Posted by phoenix View Post
You can't do that, for High Availability you'd need to run something like DRBD (search the forums for DRBD).
Of course that would be ideal.

My scenario machine A) and Machine B)
A) runing zimbra.
B) stop Zimbra

I sync at night.
And anytime B) can run zimbra


All good until you start zmcontrol
Code:
 Starting ldap...Done.
Failed.
Failed to start slapd.  Attempting debug start to determine error.
hdb_db_open: database "": db_open(/opt/zimbra/data/ldap/hdb/db/id2entry.bdb) failed: Invalid argument (22).
backend_startup_one (type=hdb, suffix=""): bi_db_open failed! (22)
bdb_db_close: database "": alock_close failed
PD:
I do not want to wait for a fall to try a restore.
It's so hard to build a new machine and restore / opt / zimbra.

This happens to me in a disaster of the machine A and do not survive.

Last edited by showmanchoyin; 08-22-2011 at 03:54 AM..
Reply With Quote
  #6 (permalink)  
Old 08-22-2011, 09:28 AM
Intermediate Member
 
Posts: 18
Exclamation

I'm starting to worry.
I hoped to save /opt/zimbra could restore at any time.
Those who have never tried a restore, they can try.
Please someone can help me.
Reply With Quote
  #7 (permalink)  
Old 08-23-2011, 05:59 AM
Intermediate Member
 
Posts: 18
Talking

SOLUCIONADO = SOLVED
Thank you very much to king0770
zimbra LDAP crash when start

as root
Code:
# cp /opt/zimbra/data/ldap/ldap.bak /tmp/ldap.bak
# /opt/zimbra/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -cv -l /tmp/ldap.bak
# chown zimbra:zimbra -R /opt/zimbra/data/ldap/hdb/
# su zimbra
$ zmcontrol start
	ldap                    Running
	logger                  Running
	mailbox                 Running
	mta                     Running
	snmp                    Running
	spell                   Running
	stats                   Running

The question now is, when and how to create or update ldap.bak?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.