Results 1 to 2 of 2

Thread: [SOLVED] disaster recover

  1. #1
    Join Date
    Jun 2007
    Location
    Quito, Ecuador
    Posts
    258
    Rep Power
    8

    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

  2. #2
    Join Date
    Jun 2007
    Location
    Quito, Ecuador
    Posts
    258
    Rep Power
    8

    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.

Similar Threads

  1. Replies: 1
    Last Post: 09-12-2008, 02:06 PM
  2. Disaster Recovery
    By rmvg in forum Administrators
    Replies: 4
    Last Post: 06-15-2008, 08:22 PM
  3. Disaster Recovery on a Multi Server Configuration
    By dlochart in forum Administrators
    Replies: 2
    Last Post: 04-14-2007, 06:08 AM
  4. Disaster Recovery Steps for v3.1.4 Network Edition
    By ThorGoLucky in forum Administrators
    Replies: 0
    Last Post: 09-08-2006, 12:08 PM
  5. Recovering from disaster when suddenly...nothing happens
    By ThorGoLucky in forum Administrators
    Replies: 1
    Last Post: 09-01-2006, 06:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •