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-12-2009, 10:01 PM
Advanced Member
 
Posts: 186
Exclamation from zimbra to zimbra

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

Regards
Adeel
Reply With Quote
  #2 (permalink)  
Old 08-13-2009, 12:35 AM
Moderator
 
Posts: 7,911
Default

I don't think so ... what issue are you encountering ?
__________________
Reply With Quote
  #3 (permalink)  
Old 08-13-2009, 05:35 AM
Advanced Member
 
Posts: 186
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..
Reply With Quote
  #4 (permalink)  
Old 08-13-2009, 05:41 AM
Advanced Member
 
Posts: 186
Exclamation

FOLLOWING IS THE REASON OF DISABLING IT,
from zimbra to zimbra
Reply With Quote
  #5 (permalink)  
Old 08-13-2009, 06:10 AM
Moderator
 
Posts: 7,911
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
__________________
Reply With Quote
  #6 (permalink)  
Old 08-13-2009, 06:14 AM
Advanced Member
 
Posts: 186
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
Reply With Quote
  #7 (permalink)  
Old 08-13-2009, 06:19 AM
Moderator
 
Posts: 7,911
Default

For server migration why are you re-inventing the wheel when a working process is already available ?
__________________
Reply With Quote
  #8 (permalink)  
Old 08-14-2009, 05:38 AM
Advanced Member
 
Posts: 186
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
Reply With Quote
  #9 (permalink)  
Old 08-14-2009, 05:42 AM
Moderator
 
Posts: 7,911
Default

So everything is working now ? If so, perhaps write up your script on the http://wiki.zimbra.com.
__________________
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.