King0770-Notes-Drop-Single-Mboxgroup-and-Reimport: Difference between revisions

No edit summary
No edit summary
 
Line 1: Line 1:
{{BC|Community Sandbox}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=King Notes Drop Single Mboxgroup and reimport=
{{KB|{{Unsupported}}|{{ZCS 7.0}}|{{ZCS 6.0}}|}}
{{Archive}}{{WIP}}
{{Archive}}{{WIP}}


Line 48: Line 53:
See the following article to do a complete mysql export and import for the whole server:<br>
See the following article to do a complete mysql export and import for the whole server:<br>
http://wiki.zimbra.com/index.php?title=Mysql_Crash_Recovery
http://wiki.zimbra.com/index.php?title=Mysql_Crash_Recovery
 
{{Article Footer|Zimbra Collaboration 7.0, 6.0|04/16/2014}}
[[Category:MySQL]]
[[Category:MySQL]]
[[Category:Community Sandbox]]
[[Category:Community Sandbox]]

Latest revision as of 09:57, 12 July 2015

King Notes Drop Single Mboxgroup and reimport

   KB 2975        Last updated on 2015-07-12  




0.00
(0 votes)


There are times when there is a single mboxgroup DB that is corrupted, and you don't need to dump the DB's for every mboxgroup.

Here's an example of dumping mboxgroup9.

First, you may need to find out which accounts are on mboxgroup9.

mysql -e "select comment, group_id from zimbra.mailbox where group_id='9'"

1) zmcontrol stop

2) Edit the file /opt/zimbra/conf/my.cnf and add a line innodb_force_recovery = 1 under the [mysqld] section
(Note that it may be necessary to increase the recovery level depending on the extent of the database corruption, as shown at the end of the database dump step)

3) mysql.server start

4) source ~/bin/zmshutil

5) zmsetvars

6) mkdir /tmp/mysql.sql

7) ~/mysql/bin/mysqldump mboxgroup9 -S $mysql_socket -u root --password=$mysql_root_password >> /tmp/mysql.sql/mboxgroup9.sql

8) mysql -u root --password=$mysql_root_password -e "drop database mboxgroup9"

9) mysql -e "create database mboxgroup9 character set utf8"

10) mysql.server stop

11) Comment line in my.cnf ( innodb_force_recovery = 1)

12) mysql.server start

13) mysql mboxgroup9 < /tmp/mysql.sql/mboxgroup9.sql

14) mysql.server stop

15) zmcontrol start

See the following article to do a complete mysql export and import for the whole server:
http://wiki.zimbra.com/index.php?title=Mysql_Crash_Recovery

Verified Against: Zimbra Collaboration 7.0, 6.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=King0770-Notes-Drop-Single-Mboxgroup-and-Reimport Date Modified: 2015-07-12



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search