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

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 11-24-2008, 12:14 PM
Trained Alumni
 
Posts: 258
Default [SOLVED] disaster recover

Hi guys, i got serius problems with my zimbra, it seems that my server fails, so i tried to upload my last backup to my /opt/zimbra it seems like it is using the same space and seem to have everything, i tried to run /install.sh -s over the loaded backup and seems to work, no errors, i try to start zimbra and ldap never starts, i checked for /opt/conf/localconfig.xml and i find out that is there but with no records, just what happened there? is there a way to recover the whole configuration? i only had that backup for this server and checked the localconfig.xml file on the backup and is incomplete too, at this time i would like to recover all mailbox from my damaged system, is there a way to achieve it? i'm running zimbra oss 5.0.9 on a centos 4, thanks any help
Reply With Quote
  #2 (permalink)  
Old 10-17-2009, 11:24 PM
Trained Alumni
 
Posts: 258
Default

well i just solve with this guide, you have to got some luck with it:


su - zimbra
zmcontrol stop
# kill other zimbra owned process (perl zmlogger in my case)
cd /opt/zimbra
mv db db-bkp
cd logger/
mv db db-bkp
cd ..
mv openldap-data openldap-data-bkp
mv store store-bkp
cp -a /opt/zimbra-BKP/db .
cp -a /opt/zimbra-BKP/logger/db logger/
cp -a /opt/zimbra-BKP/openldap-data .
cp -a /opt/zimbra-BKP/store .
/opt/zimbra/libexec/zmfixperms #to garantee
zmcontrol start


Then


1. Login as root then su Zimbra

su zimbra

2. Stop Zimbra

zmcontrol stop

3. Go back to root

exit

4. Edit your my.cnf file.

pico /opt/zimbra/conf/my.cnf

5. Add the follwing below the [mysql] section.

innodb_force_recovery = 3

6. Save and exit

7. Login as zimbra

su zimbra

8. Start mysql server

mysql.server start

9. Dump out a list of databases to a temporary list.

mysql -NB -e "show databases" | grep mbox > /tmp/mysql.db.list


10. Make a temp directory to put stuff in. mkdir /tmp/mysql.sql


11. Dump your zimbra database to a file.

/opt/zimbra/mysql/bin/mysqldump zimbra -S /opt/zimbra/db/mysql.sock -u root --password=$mysql_root_password > /tmp/mysql.sql/zimbra.sql

12. Dump your mailbox databases to files.

for db in `< /tmp/mysql.db.list`;
do
/opt/zimbra/mysql/bin/mysqldump $db -S /opt/zimbra/db/mysql.sock -u root \
--password=$mysql_root_password > /tmp/mysql.sql/$db.sql
echo -e "Dumped $db\n"
done

13.Drop your mailbox databases

for db in `< /tmp/mysql.db.list`
do
mysql -u root --password=$mysql_root_password -e "drop database $db"
echo -e "Dropped $db"
done

14. Drop your zimbra database

mysql -e "drop database zimbra"

15. Stop mysql server

mysql.server stop

16. exit to root exit

17. Edit my.conf, remove the innodb_force_recovert entry.

pico /opt/zimbra/conf/my.cnf

18. Save and exit.

19. Remove the ibdata, ib_logfile0 and ib_logfile1

rm /opt/zimbra/db/data/ibdata1
rm /opt/zimbra/db/data/ib_*

20. Login as zimbra

su zimbra

21. Start mysql server

mysql.server start

22. Create zimbra database

mysql -e "create database zimbra character set utf8"

23. Create Mailbox databases

for db in `< /tmp/mysql.db.list`
do
mysql -e "create database $db character set utf8"
echo -e "Created $db \n"
done

24. Import zimbra data

mysql zimbra < /tmp/mysql.sql/zimbra.sql

25. Import mailbox data

for sql in /tmp/mysql.sql/mbox*
do
mysql `basename $sql .sql` < $sql
echo -e "Updated `basename $sql .sql` \n"
done

26. Stop mysql server

mysql.server stop

27. Start zimbra

zmcontrol start


28. Check your mysql_error.log file for errors, make sure you can login, etc. etc.

29. If its good, do the happy dance. If not, restore from backup and try something else.



Al this info was recovered from the forums
__________________
|>Z - Sync S.A.
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.