Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Ask questions about your setup or get help installing ZCS server (ZD section below).
Post Reply
bilbolodz
Posts: 3
Joined: Tue Nov 14, 2023 12:38 pm

Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by bilbolodz »

I've Ubuntu 20.04 server with s zimbra 10.1.4 (Maldua's Zimbra FOSS Build). I've to upgrade OS to Ubuntu 22.04 but I can't find a way to do it "in place" (without installing another server and migrating data). In the past It was quite easy: during do-release-upgrade you have to enable disabled zimbra repository and fix distro name and upgrade went smoothly.
Now (on test server) I've ended up with uninstalled zimbra, installing packages from version zcs-10.1.4_GA_4200000.UBUNTU22_64 after ubuntu upgrade leads to not working zimbra.
WEBGUI and WEBADMINGUI is not working

Does anyone managed to do such upgrade?
theZimbler
Posts: 9
Joined: Fri Jan 17, 2025 1:18 pm

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by theZimbler »

Same problem here but with network version, i'll keep an eye on this post to see if anyone has a solution, but in my case if we update from 20 to 22 with Z10.1.3 it ends up uninstalled, even if we unmount the disks where zimbra is located :cry:
bilbolodz
Posts: 3
Joined: Tue Nov 14, 2023 12:38 pm

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by bilbolodz »

OK, I've managed to solve problem. It look's that in case of OS version change some passwords from backup are NOT copied.
I will describe my in place upgrade procedure (based on https://wiki.zimbra.com/wiki/Ubuntu_Upgrades).
Initial state
- OS - Ubuntu 20.04
- Zimbra 10.1.4 (Maldua’s Zimbra Foss Build)

Final state:
- OS - Ubuntu 22.04
- Zimbra 10.1.4 (Maldua’s Zimbra Foss Build)

Steps to make you happy:

Stop Zimbra
su - zimbra -c 'zmcontrol stop'
Make z backup
mkdir -p /opt/{zimbra_backup/.saveconfig,ldap_backup}
chown zimbra:zimbra /opt/{zimbra_backup,ldap_backup} -R
cp -pvr /opt/zimbra/.install_history /opt/zimbra_backup/.saveconfig/.install_history
cp -pvr /opt/zimbra/conf/localconfig.xml /opt/zimbra_backup/.saveconfig/localconfig.xml

apt list --installed | grep -i 'zimbra-' | cut -d'/' -f1 > /opt/zimbra_backup/.saveconfig/.installedPackages

su - zimbra
/opt/zimbra/libexec/zmslapcat -c /opt/ldap_backup/
/opt/zimbra/libexec/zmslapcat -a /opt/ldap_backup/
/opt/zimbra/libexec/zmslapcat /opt/ldap_backup/
Disable zimbra start on OS startup
systemctl disable zimbra.service
OS Upgrade
apt-get update && apt-get dist-upgrade
do-release-upgrade
You can answer Yes on all upgrade suggestions (even on delete obsolete packages)

Get install package for Ubuntu 22.04
wget https://github.com/maldua/zimbra-foss-b ... 171952.tgz
tar xvfz zcs-10.1.4_GA_4200000.UBUNTU22_64.20241224171952.tgz
cd zcs-10.1.4_GA_4200000.UBUNTU22_64.20241224171952
Install Zimbra packages for Ubuntu 22.04. You can chose default answer for all questions BUT remember to NOT delete /opt/zimbra directory and than Yes to allow system modification
./install.sh -s --skip-activation-check
Restore zimbra backuped config:
cp -pvr /opt/zimbra_backup/.saveconfig/.install_history /opt/zimbra/.install_history  
cp -pvr /opt/zimbra_backup/.saveconfig/localconfig.xml /opt/zimbra/conf/localconfig.xml
Run "/opt/zimbra/libexec/zmsetup.pl" to complete configuration part, this step will take only few minutes to complete configuration.
/opt/zimbra/libexec/zmsetup.pl
Now tricky part: zmsetup.pl will complain about Unset/Not verified passwords.
Find these passwords in /opt/zimbra/conf/localconfig.xml and set it (admin password is missing in backup you should know it)
Apply configuration and script should end with success BUT zimbra still will NOT work:
su - zimbra -c 'zmcontrol status'
Host xxxxx
amavis Running
antispam Running
antivirus Running
dnscache Running
ldap Running
logger Running
mailbox Stopped
zmmailboxdctl is not running.
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Stopped
zmmailboxdctl is not running.
snmp Running
spell Running
stats Running
zimbra webapp Stopped
zmmailboxdctl is not running.
zimbraAdmin webapp Stopped
zmmailboxdctl is not running.
zimlet webapp Stopped
zmmailboxdctl is not running.
zmconfigd Running
Now starts MAGIC: get mailboxd_keystore_password from /opt/zimbra/conf/localconfig.xml and set it:
su zimbra -c '/opt/zimbra/bin/zmlocalconfig -e mailboxd_keystore_password=XXXXX'
Restart zimbra:
su - zimbra -c 'zmcontrol restart'
Be proud an happy owner of upgraded in place Zimbra on Ubuntu 22.04:
su - zimbra -c 'zmcontrol status'
Host xxxxx
amavis Running
antispam Running
antivirus Running
dnscache Running
ldap Running
logger Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running
Enable zimbra start on OS startup:
systemctl enable zimbra.service
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 234
Joined: Thu Jan 30, 2014 11:13 am

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by adrian.gibanel.btactic »

bilbolodz wrote: Thu Jan 23, 2025 12:32 pm OK, I've managed to solve problem. It look's that in case of OS version change some passwords from backup are NOT copied.
I will describe my in place upgrade procedure (based on https://wiki.zimbra.com/wiki/Ubuntu_Upgrades).
Initial state
That's not a good piece of advice. That page makes things more difficult than they should be.
Last edited by adrian.gibanel.btactic on Thu Jan 23, 2025 4:48 pm, edited 1 time in total.
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 234
Joined: Thu Jan 30, 2014 11:13 am

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by adrian.gibanel.btactic »

This is the third time that I have to reply in the forums regarding Ubuntu upgrades having problems.

As I don't like to repeat myself I have created a wiki page that explains how to upgrade from one Ubuntu version to a newer Ubuntu version while keeping your Zimbra ZCS installation intact.

That way anyone can copy and paste the url when this question arises again.

Zimbra ZCS - Ubuntu Upgrade (based on third-party repo)
User avatar
scantec
Advanced member
Advanced member
Posts: 77
Joined: Mon May 05, 2014 11:55 am

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by scantec »

@bilbolodz and @adrian.gibanel.btactic great work! Thanks for sharing!
theZimbler
Posts: 9
Joined: Fri Jan 17, 2025 1:18 pm

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by theZimbler »

adrian.gibanel.btactic wrote: Thu Jan 23, 2025 4:48 pm This is the third time that I have to reply in the forums regarding Ubuntu upgrades having problems.

As I don't like to repeat myself I have created a wiki page that explains how to upgrade from one Ubuntu version to a newer Ubuntu version while keeping your Zimbra ZCS installation intact.

That way anyone can copy and paste the url when this question arises again.

Zimbra ZCS - Ubuntu Upgrade (based on third-party repo)
I tried the procedure you linked and it worked perfectly, no errors, no problems, everything working smooth and fine.
We did it on 2 different servers with U20 and Z10.1.2 and it updated both Ubuntu and Zimbra to the latest version available.
Thanks a lot!!!!!
bilbolodz
Posts: 3
Joined: Tue Nov 14, 2023 12:38 pm

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by bilbolodz »

@adrian.gibanel.btactic I've tried and your way is working fine and indeed is much simpler and user friendly. Thank you very much.
siliconalchemy
Posts: 22
Joined: Wed Jan 03, 2018 8:39 am

Re: Ubuntu 20.04 to 22.04 upgrade with Maldua's Zimbra FOSS Builds

Post by siliconalchemy »

I was fearing doing this upgrade, thank you!!
Post Reply