Mastering The Upgrade Process Of Carbonio Community Edition Email Server | Carbonio CE

In this article, we will discuss the up-gradation process of Carbonio CE email server. You can find all information mentioned here in the official documentation page.

Up-gradation is a critical task. Therefore, it is strongly recommended to keep snapshot/data backup of your server.

So Let’s proceed to the up-gradation steps.

Step-1 Check All Services

Make sure all the services in your server is running. And nothing funny is going on behind your back.

zextras@mail:~$ zmcontrol -v
Carbonio Release 22.11.0

zextras@mail:~$ zmcontrol status
Host mail.example.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        directory-server        Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        service-discover        Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running
zextras@mail:~$

This is not a mandatory step but it can save you from any unwanted situation.

Step-2 Clean Cached Package List And Information

Before proceeding to upgrade all necessary packages, clean up your cached package list and information.

Execute this command as root user

For Ubuntu

root@mail:~# apt clean

For RHEL

root@mail:~# dnf clean all

When a system admin installs any package it downloads the file from the repository to the local storage(/var/cache/apt/archives/) and installs it. apt clean or dnf clean all removes the residuals of previously installed/cached packages. After running this command, during any package installation your system again fetches the package & it’s dependencies from the repository and prevents you from installing any old/cached package which can cause trouble in your installation/up-gradation.

Step-3 Update Package List

Execute apt update as a root user.

root@mail:~# apt update
Hit:1 http://bd.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://bd.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://bd.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://bd.archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
65 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@mail:~#

Step-4 Check Up-gradable Package List

Check the up-gradable packages list with apt list --upgradable.

root@mail:~# apt list --upgradable | grep carbonio

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

carbonio-admin-console-ui/focal 0.9.5-1ubuntu1~ all [upgradable from: 0.9.4-1ubuntu1~]
carbonio-admin-login-ui/focal 0.9.1-1ubuntu1~ amd64 [upgradable from: 0.9.0-1ubuntu1~]
carbonio-admin-ui/focal 0.9.5-1ubuntu1~ all [upgradable from: 0.9.4-1ubuntu1~]
carbonio-appserver-conf/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-appserver-service/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-appserver-war/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-appserver/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
carbonio-auth-ui/focal 0.1.11-1ubuntu1~ all [upgradable from: 0.1.9-1ubuntu1~]
carbonio-calendars-ui/focal 0.1.41-1ubuntu1~ all [upgradable from: 0.1.36-1ubuntu1~]
carbonio-common-appserver-conf/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-common-appserver-db/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-common-appserver-docs/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-common-appserver-native-lib/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-common-core-jar/focal 4.0.18-1ubuntu1~focal amd64 [upgradable from: 4.0.17-1ubuntu1~focal]
carbonio-contacts-ui/focal 0.1.32-1ubuntu1~ all [upgradable from: 0.1.28-1ubuntu1~]
carbonio-core/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
carbonio-directory-server/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
carbonio-files-ce/focal 0.7.0-1ubuntu1~ amd64 [upgradable from: 0.6.0-1ubuntu1~]
carbonio-files-ui/focal 0.2.8-1ubuntu1~ all [upgradable from: 0.2.4-1ubuntu1~]
carbonio-logger/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
carbonio-login-ui/focal,focal 0.9.1-1ubuntu1~ amd64 [upgradable from: 0.9.0-1ubuntu1~]
carbonio-mails-ui/focal 0.1.54-1ubuntu1~ all [upgradable from: 0.1.48-1ubuntu1~]
carbonio-mta/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
carbonio-preview-ce/focal 0.2.13-2ubuntu1~ amd64 [upgradable from: 0.2.12-1ubuntu1~]
carbonio-proxy/focal 4.0.13-1ubuntu1~ amd64 [upgradable from: 4.0.12-1ubuntu1~]
carbonio-shell-ui/focal 0.4.45-1ubuntu1~ all [upgradable from: 0.4.42-1ubuntu1~]
carbonio-user-management/focal 0.1.3-1ubuntu1~ amd64 [upgradable from: 0.1.2-1ubuntu1~]
carbonio-webui/focal 4.0.17-1ubuntu1~focal amd64 [upgradable from: 4.0.16-1ubuntu1~focal]
root@mail:~#

Now we need to notice few things.

Issue-1

If the apt list --upgradable list contains the package carbonio-directory-server then you need to do some backup task. As you can see that we have carbonio-directory-server package in the up-gradable packages list, so we are going to follow the below mentioned steps.

  • Make a dump of the LDAP Database.
zextras@mail:~$ /opt/zextras/libexec/zmslapcat /tmp/
  • Make backup/copy of /opt/zextras/conf/localconfig.xml and save it in a safe location.
zextras@mail:~$ cp /opt/zextras/conf/localconfig.xml /tmp/
  • Stop the directory service.
zextras@mail:~$ ldap stop

Issue-2

If the apt list --upgradable list contains any -db package then you need to bootstrap the database after completing the up-gradation process. So technically, you need to perform this step after the up-gradation process. You can see that we have a -db package (carbonio-common-appserver-db) in the up-gradable package list, hence we will bootstrap the database after completing the package up-gradation process.

Step-5 Upgrade All Packages

Execute the apt upgrade to upgrade all packages.

If you are running a version up to 22.9.0, make sure to install the administration panel packages along with the other upgrades, before executing the upgrade.

For Ubuntu
apt install carbonio-admin-console-ui carbonio-admin-ui
For RHEL
dnf install carbonio-admin-console-ui carbonio-admin-ui

Now proceed to the up-gradation process.

For Ubuntu

root@mail:~# apt upgrade

For RHEL

root@mail:~# dnf upgrade

If dnf upgrade contains carbonio-directory-server package and any -db packages then please follow Issue-1 & Issue-2 of Step-4.

Step-6 Running Bootstrap And Pending Setup

Recall our earlier brief on Issue-2. Our up-gradation process contains -db package (carbonio-common-appserver-db). now we are going to bootstrap the database. To bootstrap the database, execute the followings,

root@mail:~# PGPASSWORD=123456 carbonio-files-db-bootstrap carbonio_adm 127.0.0.1
Database: 127.0.0.1:5432 user carbonio_adm
Check postgres connection: OK
Current version is: 2.
Database already initialized! Quitting
root@mail:~#

Now, we are going to execute the pending-setups.

root@mail:~# pending-setups -aInsert the cluster credential password:

Executing all setup scripts...

Now check the version and status of all services.


zextras@mail:~$ zmcontrol -v
Carbonio Release 22.12.0
zextras@mail:~$
zextras@mail:~$ zmcontrol status
Host mail.example.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        directory-server        Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        service-discover        Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running
zextras@mail:~$

If needed, restart all services by executing zmcontrol restart.

With this, the up-gradation process completes. You can check the GUI login and email send/receive to further confirm that everything is okay.

So that’s it.

😊

Post your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Modify The Number Of Recipients In Carbonio Community Edition Email Server | Carbonio CE
6 Pillars of Digital Sovereignty – Importance, Challenges, and How to Achieve Them | Blog