Koozali.org: home of the SME Server

HOW-TO migrate zarafa-6.40.5-24860 from SME 7.5.1 to zarafa-7.0.1-28479 SME 8b7

Offline SchulzStefan

  • *
  • 620
  • +0/-0
1. Make a full dump of zarafa-6.40.x.
#: mysqldump --single-transaction -p zarafa > zarafa.dump
For the dump you need to know the mysql password. You'll find it in ~.my.cnf.
#: less .my.cnf

2. Prepare a clean install of SME8b7.

3. Get zarafa-7.0.1-28479.
#: wget http://download.zarafa.com/community/final/7.0/7.0.1-28479/zcp-7.0.1-28479-rhel-5-i386-opensource.tar.gz.
#: tar -xzvf zcp-7.0.1-28479-rhel-5-i386-opensource.tar.gz.

4. Get the php53-mapi.
#: wget ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/epel/5/i386/php53-mapi-7.0.1-1.el5.i386.rpm

5. Get smeserver-zarafa.
#: wget http://ftp.nluug.nl/os/Linux/distr/smeserver/releases/7/smedev/i386/RPMS/smeserver-zarafa-0.9.0-53.el4.sme.noarch.rpm

6. For the migration of the 6.40.x database, you need MySql-Python.
#: yum install MySQL-python
This will install mx also.

7. Make symlinks
#: ln -s /lib/libcrypto.so.0.9.8e /usr/lib/libcrypto.so.0.9.8
#: ln -s /lib/libssl.so.0.9.8e /usr/lib/libssl.so.0.9.8
#: sv t httpd-e-smith

8. Now we are ready to install zarafa-7.0.1. Change in the directory where you untared zarafa. Then do a
#: yum localinstall *.rpm

9. We have to remove the php-mapi.
#: rpm -e php-mapi --nodeps

10. Now we are ready to install the php53 and the smeserver-zarafa rpms.
#: yum localinstall php53-mapi-7.0.1-1.el5.i386.rpm smeserver-zarafa-0.9.0-53.el4.sme.noarch.rpm

11. Initialize zarafa
#: /etc/e-smith/events/actions/zarafa-install
REMEMBER CAREFULLY WHAT PLUGIN YOU'VE CHOOSEN FOR YOUR 6.40.x DATABASE. YOU'LL HAVE TO CHOOSE THE SAME HERE.

12. #: signal-event post-upgrade; signal-event reboot

13. Now we are going to prepare the zarafa and the database for using on SME8.
#: /etc/e-smith/events/actions/zarafa-services stop
#: nano /etc/zarafa/userscripts/users_common.sh
Under
ZARAFA_LANG="${ZARAFA_USERSCRIPT_LOCALE:-${LC_MESSAGES:-en_US}}"
Insert
ZARAFA_LANG="de_DE.UTF-8"
Repeat this for the files groups_common.sh and companies_common.sh located in the same directory as the users_common.sh file.

14. Drop the zarafa database.
mysql>: drop database zarafa;
mysql>: create database zarafa;
mysql>: quit

15. Ready to restore the dump in the new database.
#: mysql zarafa < zarafa.dump

Be patient. Depending on the size of the database, this could take time.

16. Open a second terminal. Watch the logs.
#: tail -f /var/log/zarafa/*

17. In the first terminal perform:
#: /etc/e-smith/events/actions/zarafa-services restart

18. In the second terminal you should read, that the database could not be upgraded.

Sun Dec  4 15:47:26 2011: Starting zarafa-server version 7,0,1,28479, pid 3887
Sun Dec  4 15:47:26 2011: Connection to database 'zarafa' succeeded
Sun Dec  4 15:47:26 2011: WARNING: zarafa-licensed not running, commercial features will not be available until it's started.
Sun Dec  4 15:47:26 2011: Start: Move IMAP subscribed list from store to inbox
Sun Dec  4 15:47:26 2011: Done: Move IMAP subscribed list from store to inbox
Sun Dec  4 15:47:26 2011: Start: Update sync table time index
Sun Dec  4 15:47:26 2011: Done: Update sync table time index
Sun Dec  4 15:47:26 2011: Start: Update changes table state key
Sun Dec  4 15:47:27 2011: Done: Update changes table state key
Sun Dec  4 15:47:27 2011: Start: Converting database to Unicode
Sun Dec  4 15:47:27 2011: Will not upgrade your database from 6.40.x to 7.0.
Sun Dec  4 15:47:27 2011: The recommended upgrade procedure is to use the zarafa7-upgrade commandline tool.
Sun Dec  4 15:47:27 2011: Please consult the Zarafa administrator manual on how to correctly upgrade your database.
Sun Dec  4 15:47:27 2011: Alternatively you may try to upgrade using --force-database-upgrade.
Sun Dec  4 15:47:27 2011: However, the database will contain invalid data, and the server and client programs may crash because of this.
Sun Dec  4 15:47:27 2011: Failed: Rollback database
Sun Dec  4 15:47:27 2011: Can't update the database: Unable to upgrade zarafa from version 6.40.24860 to 7.0.1.28479
Sun Dec  4 15:47:27 2011: Server shutdown complete.

The server didn't start. You are advised to use an upgrade-script from zarafa. So we'll do:

19. In the first terminal:
#: /etc/e-smith/events/actions/zarafa-services stop
#: python /usr/share/doc/zarafa/zarafa7-upgrade
Be patient. Depending on the size of the database, this could take time. You'll see the progess of the converting - in my case with no errors.

20. Restart zarafa in the first terminal. Watch the second terminal.
#: /etc/e-smith/events/actions/zarafa-services restart

==> /var/log/zarafa/gateway.log <==
Sun Dec  4 15:49:45 2011: [ 3951] Starting zarafa-gateway version 7,0,1,28479 (28479), pid 3951

==> /var/log/zarafa/ical.log <==
Sun Dec  4 15:49:45 2011: Listening on port 8088.
Sun Dec  4 15:49:45 2011: Listening on secure port 8089.
Sun Dec  4 15:49:45 2011: [ 3961] Starting zarafa-ical version 7,0,1,28479 (28479), pid 3961

==> /var/log/zarafa/monitor.log <==
Sun Dec  4 15:49:46 2011: Starting zarafa-monitor version 7,0,1,28479 (28479), pid 3972

==> /var/log/zarafa/server.log <==
Sun Dec  4 15:49:46 2011: Starting zarafa-server version 7,0,1,28479, pid 3981
Sun Dec  4 15:49:46 2011: Connection to database 'zarafa' succeeded
Sun Dec  4 15:49:46 2011: WARNING: zarafa-licensed not running, commercial features will not be available until it's started.
Sun Dec  4 15:49:46 2011: Start: Converting receivefolder table to Unicode
Sun Dec  4 15:49:46 2011: Done: Converting receivefolder table to Unicode
Sun Dec  4 15:49:46 2011: Listening for pipe connections on /var/run/zarafa
Sun Dec  4 15:49:46 2011: Listening for TCP connections on port 236
Sun Dec  4 15:49:46 2011: Listening for SSL connections on port 237
Sun Dec  4 15:49:46 2011: Startup succeeded on pid 3985

==> /var/log/zarafa/spooler.log <==
Sun Dec  4 15:49:46 2011: [ 3996] Starting zarafa-spooler version 7,0,1,28479 (28479), pid 3996
Sun Dec  4 15:49:46 2011: [ 3996] Using SMTP server: localhost, port 25
Sun Dec  4 15:49:46 2011: [ 3996] Connection to Zarafa server succeeded

21. If all went fine your usres should be able to connect via https://YOUR-IP/zarafa.

There are still a few things to do:
- The changes in /etc/zarafa/userscripts/*_common.sh should be templated.
- The error "Warning: Terminal locale not UTF-8, but UTF-8 locale is being forced. Screen output may not be correctly printed." Should also be fixed. I read in the zarafa-forum, that en_US.utf-8 *must* be installed. Don't know, if the error depends on that.
- I didn't try z-push yet.

I did all tests in a VM. Thanks to snoble and pfloor who did the most work.
stefan

First Edit for: http://forums.contribs.org/index.php/topic,47675.msg236655.html#msg236655. Thx to gordon for that.
Tried this. Error is gone. But I read also the http://bugs.contribs.org/show_bug.cgi?id=6683.

Second Edit for z-push:
Installed the latest z-push stable release.
#: wget http://download.berlios.de/z-push/z-push-1.5.5-790.tar.gz

Followed the http://wiki.contribs.org/Zarafa#Mobile_synchronisation. Only thing I did was to rename the directory from z-push-1.5.5-790 to z-push in /var/www/html. Seems to work. No errors so far.
« Last Edit: December 04, 2011, 09:24:40 PM by SchulzStefan »
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)

Offline Stefano

  • *
  • 10,894
  • +3/-0
excellet :)

just some things

1. Make a full dump of zarafa-6.40.x.
#: mysqldump --single-transaction -p zarafa > zarafa.dump
For the dump you need to know the mysql password. You'll find it in ~.my.cnf.
#: less .my.cnf

I think this could be:
Code: [Select]
mysqldump --single-transaction -p`grep password /root/.my.cnf | awk -F= {'print $2'}`  zarafa > zarafa.dump

Quote
4. Get the php53-mapi.
#: wget ftp://ftp.sunet.se/pub/Linux/distributions/fedora/epel/epel/5/i386/php53-mapi-7.0.1-1.el5.i386.rpm

not needed, you should configure Epel repo via Wiki howto

Quote
5. Get smeserver-zarafa.
#: wget http://ftp.nluug.nl/os/Linux/distr/smeserver/releases/7/smedev/i386/RPMS/smeserver-zarafa-0.9.0-53.el4.sme.noarch.rpm

smeserver-zarafa is in SME7 smedev repo..
just adapt the http://wiki.contribs.org/SME8.0_Contribs_QA#Setup instructions to point to smedev repo

Quote
10. Now we are ready to install the php53 and the smeserver-zarafa rpms.
#: yum localinstall php53-mapi-7.0.1-1.el5.i386.rpm smeserver-zarafa-0.9.0-53.el4.sme.noarch.rpm

with the repos enabled, this become:

Code: [Select]
yum install php53-mapi smeserver-zarafa --enablerepo=epel --enablerepo=sme7dev

Quote
13. Now we are going to prepare the zarafa and the database for using on SME8.
#: /etc/e-smith/events/actions/zarafa-services stop
#: nano /etc/zarafa/userscripts/users_common.sh
Under
ZARAFA_LANG="${ZARAFA_USERSCRIPT_LOCALE:-${LC_MESSAGES:-en_US}}"
Insert
ZARAFA_LANG="de_DE.UTF-8"
Repeat this for the files groups_common.sh and companies_common.sh located in the same directory as the users_common.sh file.

well, in your case is de_DE.UTF-8 :)
it depends on the language choosen in setup
Code: [Select]
config getprop sysconfig Language
in my case is en_US, so it becomes en_US.UTF-8

Quote
- The changes in /etc/zarafa/userscripts/*_common.sh should be templated.
- The error "Warning: Terminal locale not UTF-8, but UTF-8 locale is being forced. Screen output may not be correctly printed." Should also be fixed. I read in the zarafa-forum, that en_US.utf-8 *must* be installed. Don't know, if the error depends on that.
- I didn't try z-push yet.

I did all tests in a VM. Thanks to snoble and pfloor who did the most work.
stefan

finally, all the instructions should be in http://wiki.contribs.org/Zarafa page

thank you for you effort

P.S. please remember to use the "code" tag next time ;-)
« Last Edit: December 04, 2011, 05:01:27 PM by Stefano »

Offline ilconte

  • ****
  • 130
  • +0/-0
hello stefano i have this error when install zarafa:

yum localinstall zarafa-7.0.1-28479.i386.rpm
Loaded plugins: fastestmirror, protect-packages, smeserver
Setting up Local Package Process
Examining zarafa-7.0.1-28479.i386.rpm: zarafa-7.0.1-28479.i386
Marking zarafa-7.0.1-28479.i386.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: it.centos.contactlab.it
 * smeaddons: ftp.nluug.nl
 * smeextras: ftp.nluug.nl
 * smeos: ftp.nluug.nl
 * smeupdates: ftp.nluug.nl
 * smeupdates-testing: ftp.nluug.nl
 * updates: it.centos.contactlab.it
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Resolving Dependencies
--> Running transaction check
---> Package zarafa.i386 0:7.0.1-28479 set to be updated
--> Processing Dependency: zarafa-server = 7.0.1-28479 for package: zarafa
--> Processing Dependency: zarafa-client = 7.0.1-28479 for package: zarafa
--> Processing Dependency: zarafa-libs = 7.0.1-28479 for package: zarafa
--> Processing Dependency: zarafa-utils for package: zarafa
--> Processing Dependency: zarafa-monitor for package: zarafa
--> Processing Dependency: zarafa-spooler for package: zarafa
--> Processing Dependency: zarafa-dagent for package: zarafa
--> Processing Dependency: zarafa-ical for package: zarafa
--> Processing Dependency: zarafa-gateway for package: zarafa
--> Processing Dependency: zarafa-indexer for package: zarafa
--> Finished Dependency Resolution
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-server = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-ical is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-libs = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-monitor is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-utils is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-client = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-dagent is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-indexer is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-gateway is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
zarafa-7.0.1-28479.i386 from /zarafa-7.0.1-28479.i386 has depsolving problems
  --> Missing Dependency: zarafa-spooler is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-gateway is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-utils is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-ical is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-dagent is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-server = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-client = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-indexer is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-libs = 7.0.1-28479 is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-spooler is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
Error: Missing Dependency: zarafa-monitor is needed by package zarafa-7.0.1-28479.i386 (/zarafa-7.0.1-28479.i386)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

solution ?

Offline Stefano

  • *
  • 10,894
  • +3/-0
you are installing a single rpm.. please re-read the first post..
you must execute
Code: [Select]
yum localinstall *.rpm

from the directory where you untarred the tar.gz file

BTW, I'm not using zarafa anymore.. and I'm moving the last server with it to SME8.b7

Offline SchulzStefan

  • *
  • 620
  • +0/-0
@ Stefano

Thank you for pointing the details out.

stefan
And then one day you find ten years have got behind you.

Time, 1973
(Mason, Waters, Wright, Gilmour)