Results 1 to 9 of 9

Thread: from zimbra to zimbra

  1. #1
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Exclamation from zimbra to zimbra

    Hi all,
    Is there any way to disable indexing for each mailbox?

    Regards
    Adeel

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    I don't think so ... what issue are you encountering ?

  3. #3
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Exclamation from zimbra to zimbra

    Hi all,
    I am migrating from 5.0.18 to 5.0.18.
    I created all the users in ldap in the new server, took the tar of store and restore it on the new server. Restored the dumped of the mysql.
    I had the following for taking dump of the mysql and restoring it .

    source ~/bin/zmshutil ; zmsetvars
    mysql --batch --skip-column-names -e "show databases" | grep -e mbox -e zimbra > /backup/mysql.db.list
    mkdir /backup/detail-database

    for db in `cat /backup/mysql.db.list`; do
    ~/mysql/bin/mysqldump $db -S $mysql_socket -u root --password=$mysql_root_password > /backup/detail-database/$db.sql
    echo "Dumped $db"
    done
    ####################
    For restoring
    ####################
    source ~/bin/zmshutil ; zmsetvars

    for db in `cat /backup/mysql.db.list |grep mbox`
    do
    mysql -u root --password=$mysql_root_password -e "drop database $db"
    echo -e "Dropped $db"
    done

    mysql -u root --password=$mysql_root_password -e "drop database zimbra"

    for db in `cat /backup/mysql.db.list`
    do
    mysql -e "create database $db character set utf8"
    echo "Created $db"
    done
    mysql zimbra < /backup/detail-database/zimbra.sql
    for sql in /backup/detail-database/mbox*
    do
    mysql `basename $sql .sql` < $sql
    echo -e "Updated `basename $sql .sql` \n"
    done


    ##################
    For the first time without restarting the services when I logged in as a user, I had seen my all IM friends,calender appointments and mailbox with emails. I was unable to send emails as was getting the errors that the object already existing when clicked on the sent button.
    When I restarted the services all the data from IM, mailbox and calender was vanished, and a new mailbox was there.
    I know that I have to use the imap sync, but there should be some way to restore the mysql and getting rid of that slow and lengthy process.



    ANY IDEA WHAT HAS GONE WRONG??????
    REGARDS
    ADEEL
    Last edited by adeelarifbhatti; 08-13-2009 at 05:42 AM.

  4. #4
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Exclamation

    FOLLOWING IS THE REASON OF DISABLING IT,
    http://www.zimbra.com/forums/migrati...tml#post148212

  5. #5
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Why have you done it that way ? If you are migrating from one server to another then you should use ZCS-to-ZCS Migrations » Zimbra :: Blog

  6. #6
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Exclamation

    Does this mean that there is no way like I had tried?
    I guess, that mysql dumped is not useless, and can be used is some way, as I am trying.

    Regards
    Adeel

  7. #7
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    For server migration why are you re-inventing the wheel when a working process is already available ?

  8. #8
    Join Date
    Feb 2009
    Posts
    188
    Rep Power
    6

    Talking Migrating LDAP,MYSQL,STORE

    I am not reinventing the wheel,
    I have migrated from 5.0.18 to another system i.e 5.0.18, I had just installed the zimbra and didn't even made users in LDAP, following has enabled me to migrate from one server to another.
    ###############
    Backingup mysql,LDAP and store
    #############
    chown zimbra.zimbra /backup
    su zimbra
    zmcontrol stop;



    /opt/zimbra/libexec/zmslapcat /backup
    exit
    mkdir /backup/zim-db-data
    cp -rp /opt/zimbra/db/data/* /backup/zim-db-data
    mkdir /backup/zim-logger-db/
    cp -rp /opt/zimbra/logger/db/* /backup/zim-logger-db/
    mkdir /backup/conf-all
    cp -rp /opt/zimbra/conf/* /backup/conf-all/
    mkdir /backup/detail-database

    ######
    su zimbra
    mysql.server start
    source ~/bin/zmshutil ; zmsetvars
    mysql --batch --skip-column-names -e "show databases" | grep -e mbox -e zimbra > /backup/mysql.db.list
    mkdir /backup/detail-database

    for db in `cat /backup/mysql.db.list`; do
    ~/mysql/bin/mysqldump $db -S $mysql_socket -u root --password=$mysql_root_password > /backup/detail-database/$db.sql
    echo "Dumped $db"
    done
    mysql.server stop

    mkdir /backup/store
    cp -rp /opt/zimbra/store/* /backup/store
    mkdir /backup/index
    cp -rp /opt/zimbra/index/* /backup/index/*

    #################
    >>>>>>>>>>>>Restoring LDAP mysql and store
    #################
    rm -rf /opt/zimbra/openldap-data/*
    cp -rp /backup/zim-db-data/* /opt/zimbra/db/data/
    /opt/zimbra/openldap/sbin/slapadd -q -b "" -f /opt/zimbra/conf/slapd.conf -cv -l /backup/ldap/ldap.bak
    cp -rp /backup/conf-all/* /opt/zimbra/conf/

    rm -rf /opt/zimbra/db/data/*
    rm -rf /opt/zimbra/logger/db/*

    cp -rp /backup/zim-logger-db/* /opt/zimbra/logger/db/
    cp -rp /backup/zim-db-data/* /opt/zimbra/db/data/
    cp -rp /backup/store/* /opt/zimbra/store/

    rm -rf /opt/zimbra/index
    ##############
    >>>>> Restoring mysql
    ##############
    su zimbra
    source ~/bin/zmshutil ; zmsetvars

    for db in `cat /backup/mysql.db.list |grep mbox`
    do
    mysql -u root --password=$mysql_root_password -e "drop database $db"
    echo -e "Dropped $db"
    done

    mysql -u root --password=$mysql_root_password -e "drop database zimbra"

    for db in `cat /backup/mysql.db.list`
    do
    mysql -e "create database $db character set utf8"
    echo "Created $db"
    done
    mysql zimbra < /backup/detail-database/zimbra.sql
    for sql in /backup/detail-database/mbox*
    do
    mysql `basename $sql .sql` < $sql
    echo -e "Updated `basename $sql .sql` \n"
    done
    exit

    mkdir index
    cp -rp /backup/index/* /opt/zimbra/index/

    su zimbra
    zmcontrol start
    Regards
    Adeel

  9. #9
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    So everything is working now ? If so, perhaps write up your script on the http://wiki.zimbra.com.

Similar Threads

  1. Replies: 8
    Last Post: 01-12-2012, 02:20 AM
  2. slapd message error
    By smoke in forum Administrators
    Replies: 7
    Last Post: 04-27-2008, 04:23 PM
  3. admin consol blank after 5.0.3 upgarde
    By maumar in forum Administrators
    Replies: 6
    Last Post: 03-21-2008, 06:16 AM
  4. Replies: 12
    Last Post: 02-25-2008, 07:28 PM
  5. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 09:55 AM

Posting Permissions

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