Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
portscanner
Posts: 37
Joined: Sat Sep 13, 2014 1:49 am
Location: Planet Earth
ZCS/ZD Version: 8.8.12
Contact:

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by portscanner »

=Overview=
I wrote this document because I saw many people having problems with upgrading across OS versions. Using the following procedure, I was able to get around the "Perl_Tstack_sp_ptr" error caused by a newer version of perl. This is a 64 bit to 64 bit migration. I cant speak for a 32bit to 64 bit migration.
Additional goals were:

* Establish a way to upgrade the hardware (new cpu, larger hard drives, etc)

* Have a way to recover back to the starting point without having to go into full disaster recovery mode. If I upgrade in place, and the upgrade goes bad, I am faced with restoring from backup. With the following procedure, the "old" machine is not destroyed - it is just turned off. If the upgrade goes bad, I turn off the "new" machine and turn back on the "old" machine and I am immedately back to where I was before I started.
I tested this procedure multiple times by building two test machines and doing the following process multiple times while correcting the instructions each time until I could complete the process with no loss of data or any errors. Any feedback would be apriciated.
The total time to complete this on my production server was 3 1/2 hours (excluding the time to install Centos 6 on the new machine), however 2 1/2 hours of that was copying 44 gig of data from the old server to the new server. The long time for copying the files was due to (a) I dont have the most screaming latest processor/drives/etc and (b) I was upgrading from one virtual machine to another virtual machine - both of which were on the same box.
Although I only did this w/ the open source version, I would expect this to work just as well with the network edition. The following is from my own experience. I canot speak for any other Linux versions or even gaurantee it will work for you. YMMV.


=First Install Centos 6.2 on new machine=

==Installation Requirements==

* Assign this machine a new ip address - not the same ip address as the old server - but it must be routable so the new server can rsync to the old server. We will change the ip address later.

* during the Centos install - select the "Server" option

* name the new server the SAME as the old server! If the old server is named "mail.mydomain.com" you MUST name the new server "mail.mydomain.com" ANY change to this and the upgrade WONT WORK

==Post install actions==

* Edit /etc/sysconfig/selinux and change SELINUX=enforcing to be SELINUX=disabled

* Edit /etc/hosts and put a line in that reads ip.address.new.server fqdn.ofold.server

* execute the following:
yum -y install openssh-clients nc vim-enhanced sysstat telnet logwatch bind-utils gmp libstdc++.so.6

chkconfig postfix off

service postfix stop

yum -y update
* execute visudo - find the line "Defaults requiretty" and remark it out (put a # at the start of the line)

* configure ip tables to accept inbound ssh connections - and nothing else.

* reboot
=Install OLD version of Zimbra Open Source Edition on new server=
Get the EXACT same version you have on the old server (hopefully you saved the original tar file) and copy it on to the new server. Yes the old version is for Centos 5 and we are putting this on Centos 6 - but we wont be running it - just installing it.
* get the uid and gid for zimbra on the old server.

* create a group zimbra on the new server with the same gid as on the old server. Create a user zimbra with the same uid as on the old server. There are ways to get around not using the same uid and gid, however the work requred to get around if far more work than just creating a user with the correct uid/gid

* Start the install with the command "./install.sh -s --platform-override" Do NOT leave off the -s !

* Install the exact same modules as you have on the old server. Dont be trying to add or remove features at this time! If you dont remember the modules you have on the old server - go to the old server and execute "rpm -qa | grep zimbra" Make note if the following show up in your list:
zimbra-ldap-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-logger-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-mta-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-snmp-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-store-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-apache-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-spell-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-memcached-7.1.1_GA_3196.RHEL5_64-20110527011124

zimbra-proxy-7.1.1_GA_3196.RHEL5_64-20110527011124
** My list may be longer than yours as I have all modules installed. There will be some other RPMS listed in your list that are not above, but they will be installed automatically
==Copy the data from the old server to the new server==

The following may seem weird, but it works!

* on the old server, stop the zimbra server and fix it so it will not restart. Execute:

su -

service zimbra stop

chkconfig zimbra off

* On the new server

su -

rm -rf /opt/zimbra

rsync -aP old.server.ip.address:/opt/zimbra /opt

* Do NOT start zimbra on the new server

* Turn off the old server

* change the ip address on the new server to be the same as the old server. Confirm that the ip address change is working correctly via ssh (either ssh to the server and confirm you are on the new server or ssh from the new server to some other system where it will confirm what your ip address is)

=Upgrade new server to 7.1.3=

Yes - you read that correctly. I could not upgrade my server directly from 7.1.1 to 7.2. When I attempted to do so, the upgrade failed. So after much wailing and gnashing of teeth, I discovered if I upgraded first to 7.1.3, I then could upgrade to 7.2

* from the zcs-7.1.3_GA_3346.RHEL6_64.20110928134428 directory execute:

su -

./install.sh --platform-override

* When prompted "Do you want to verify message store database integrity? [Y]" answer NO
* When prompted "Do you wish to upgrade? [Y]" answer yes

* if there are no errors during the install, procede to upgrade to version 7.2

=Upgrade to version 7.2=

* untar the 7.2 version and start the install using the command "./install.sh --platform-overide"

* This time, when prompted "Do you want to verify message store database integrity? [Y]" answer yes

* If you get the following message, and the errors are only "You can't use locks with log tables" dont worry. This is a "feature" of mysql.
Database errors found.

/opt/zimbra/mysql/bin/mysqlcheck --defaults-file=/opt/zimbra/conf/my.cnf -S /opt/zimbra/db/mysql.sock -A -C -s -u root --auto-repair --password=XXXXXXXX

mysql.general_log

Error : You can't use locks with log tables.

mysql.slow_log

Error : You can't use locks with log tables.
* When prompted "Do you wish to upgrade? [Y]" answer yes

* When it is complete, review the logs (especially the /var/log/zimbra.log file for errors)

* using telnet, connect via port 110 to simulate a pop3 connection (see http://wiki.linuxquestions.org/wiki/Ret ... ing_telnet) Use the list command to dermine the number of emails in the mailbox

* using telnet send an email to the above pop3 account (see How to Send Email Using Telnet: 12 steps - wikiHow)

* use telnet again to connect to pop3 on the same account. The number of emails in the mailbox should have increased.

* After you are satisified that everything is working, open up the needed ports in iptables. (If need be, refer to the iptables settings on the old server)

* Congradulations, you have upgraded to 7.2 on Centos 6!
User avatar
L. Mark Stone
Ambassador
Ambassador
Posts: 2802
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 10.0.7 Network Edition
Contact:

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by L. Mark Stone »

If I may, I would suggest one change...
On the new server, after you run the installer the first time with the -s switch, do NOT remove the /opt/zimbra tree on the new server. Instead mv it someplace safe.
The two reasons for this are: first that the /opt/zimbra/zimbramon directory is OS-specific in our experience. IOW, the zimbramon directory you rsync from the old server should in most cases not be used on the new server (you could of course exclude it from the rsync too) unless both servers are running (near-) identical operating systems.
The second reason is that if the old server has gone through a number of Zimbra upgrades, the file permissions on the old server are likely a little different than on a brand new clean install, so having the /opt/zimbra from the clean install gives you a reference in case you have permissions issues. Note that there have been at least one bug with zmfixperms not actually doing the correct/whole job, so if at one point on the old server you had run zmfixperms when it was broken, your rsync will carry those permissions over to the new server.
BTW you are spot on about keeping the UID/GID on the new server the same as on the old server; it definitely keeps things simpler.
Hope that helps,

Mark
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
AWS Certified Solutions Architect-Associate
nasrul-ds3
Posts: 1
Joined: Sat Sep 13, 2014 2:14 am

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by nasrul-ds3 »

Basically, the zimbra upgraded on new server must be at least 7.1.3 before able to upgrade to 7.2? You have tried upgrading with 7.1.2 right?
Is your server working currently, without hiccup?
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by phoenix »

[quote user="nasrul-ds3"]Basically, the zimbra upgraded on new server must be at least 7.1.3 before able to upgrade to 7.2?[/QUOTE]I'm not sure if that's a question or a statement. :confused: You don't need to be at ZCS 7.1.3 to upgrade to ZCS 7.2 - upgrade paths are always documented in the Release Notes.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
latre
Posts: 18
Joined: Fri Sep 12, 2014 11:26 pm

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by latre »

I have this error:
/usr/bin/perl: symbol lookup error: /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Data/UUID/UUID.so: undefined symbol: Perl_Tstack_sp_ptr
I did all your instructions.....
portscanner
Posts: 37
Joined: Sat Sep 13, 2014 1:49 am
Location: Planet Earth
ZCS/ZD Version: 8.8.12
Contact:

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by portscanner »

Double check the order you did things in. If you install the RHEL 6.x version of zimbra onto RHEL 5.x you will get that error. I discovered that the hard way myself.
tuannv79
Posts: 11
Joined: Sat Sep 13, 2014 3:17 am

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by tuannv79 »

[quote user="portscanner"]Double check the order you did things in. If you install the RHEL 6.x version of zimbra onto RHEL 5.x you will get that error. I discovered that the hard way myself.[/QUOTE]
Hi all,
i try upgrade zimbra 7.2.4 centos 5.7 64bit to zimbra 7.2.6 centos 6.5 follow step to step above, but fail. Error backup databease fail.

Please help me.
Thanks all,
nehaljwani
Posts: 2
Joined: Sat Sep 13, 2014 3:36 am

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by nehaljwani »

[quote user="tuannv79"]Hi all,
i try upgrade zimbra 7.2.4 centos 5.7 64bit to zimbra 7.2.6 centos 6.5 follow step to step above, but fail. Error backup databease fail.

Please help me.
Thanks all,[/QUOTE]
I upgraded from Zimbra 7.1.2 to 7.2.7 and have documented the steps using a screen cast:

[video=youtube;2zNJ28dJb1c]https://www.youtube.com/watch?v=2zNJ28dJb1c[/video]
kobus.bensch
Posts: 5
Joined: Sat Sep 13, 2014 3:24 am

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by kobus.bensch »

Hi
I think these instructions are great, but no matter how many times I followed it i kept getting this error:
/usr/bin/perl: symbol lookup error: /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi/auto/Data/UUID/UUID.so: undefined symbol: Perl_Tstack_sp_ptr
So I tried the following:
I made sure all of zimbra on the new server is stopped. I downloaded 7.2.7 and upgraded my version from 7.2.0 to 7.2.7 and it all just works. One thing though, when asked to verify the DB I said no. The first time I ran the upgrade it replied yes and got the above error.
Now at least I am going to try to upgrade to V8 and see how that goes.
HTH

Kobus
tuannv79
Posts: 11
Joined: Sat Sep 13, 2014 3:17 am

Successful Upgrade of Zimbra 7.1.1 and Centos 5.6 to Zimbra 7.2 and Centos 6.2

Post by tuannv79 »

Thanks you very much, I upgrade successfull.
Post Reply