A recipe to update grommunio from Open SuSE 15.5 to 15.6.
Open SuSE 15.6 is here and grommunio provides packages for Open SuSE 15.6, we may update the appliance.
Please note: If your system is still running on Open SuSE 15.4, use this document to upgrade to Open SuSE 15.5 first: https://community.grommunio.com/d/1086-update-form-open-suse-154-to-155
Please note, with the script grommunio-update
there is also a possibility to update to SuSE 15.6. However, no backup of the configuration is created and there is no possibility to compare the package before and after the update.
This recipe shows the manual update way which offers more possibilities and error checking.
1. Preparing for the upgrade
- Have your grommunio license details (username and password) ready, you may need them in step 10
- Please note, this upgrade interrupts your mail system
- If you have a virtualised environment, take a snapshot of the system
- Connect to the grommunio server via SSH like Putty
- For most commands you can copy and paste the commands to the grommunio server
- If the server has an uptime of more than 30 days, it is recommended to reboot the server. Check the uptime with the
uptime
command and reboot with init 6
if necessary.
- Stop and disable postfix to prevent mail loss
systemctl --now disable postfix
2. Check that you have at least 5 GB of free space on the root volume
On the root /
volume we need at least of 5 GB free space for the update, do not proceed if you not have less than 5 GB free on /
. Run df -h
to see the space statistics.
3. Create a tar backup of /etc for later comparison or restore
mkdir -p /root/WH/bck/
tar -cvzf /root/WH/bck/etc_$(date +%Y%m%d-%H%M%S).tgz /etc
4. Backup MariaDB
mysqldump --all-databases > /root/WH/bck/dump_grommunio_$(date +%Y%m%d-%H%M%S).sql
5. Install the latest updates
zypper ref && zypper up -y
Note: There are 2 possible problems at this point,
- the grommunio 15.5 repository is no longer available (tbd.), in this case just continue with the updgrade, at least the Open SuSE components will be updated and grommunio will be upgraded when upgrading to 15.6 in step 11.
- neither the grommunio 15.5 repository nor the Open SuSE 15.5 repository (tbd.) exists anymore, then continue with step 8. However, you need to make sure that both 15.6 repositories exist, because if the 15.6 repositories do not exist, an update will not be easy.
A full backup is recommended in both situations.
6. Check the MariaDB schema
gromox-dbop -U
The current schema is gx-131 (22. Nov. 2024)
7. Wait about 5 minutes to allow the schema upgrade for the domain and user databases to complete and the index to be rebuilt
Use top
or htop
to view activity on the databases.
Also use journalctl -f
to see activities on this system. If you see messages like:
.... dbop_sqlite: upgrading /var/lib/gromox/user/x/y/exmdb/exchange.sqlite3 to schema EV-nn
Wait until all databases have been updated.
For the Community Edition and the Supported Edition, the current schema as of Nov. 2024 is EV-17.
8. Restart the server
init 6
9. Document the current state before the distribution update
rpm -qa | sort > /root/SLES_15.5.txt
10. Switch all repositories including other 3. party repositories like backup software from 15.5 to 15.6
sed -i 's/15.5/15.6/g' /etc/zypp/repos.d/*.repo
Check that all repositories have been updated with
cat /etc/zypp/repos.d/*.repo
Refresh repository list:
zypper refresh -f
Note that you may need your license details at this point. Check /etc/zypp/repos.d/grommunio.repo to see if username and password are in the file. The line in question looks like this:
baseurl=https://USERNAME:PASSWORD@download.grommunio.com/supported/openSUSE_Leap_15.6/?ssl_verify=no
The question from zypper about trust, should be answered as "a - trust always", if you are using a German OS, answer "i -immer vertrauen"
If you see errors about repo-sle-debug-update, disable the repository with:
zypper mr -d repo-sle-debug-update
and run refresh again:
zypper refresh -f
11. Distribution update to Open SuSE 15.6
zypper dup -y
If you see errors about obsolete openssl packages, allow zypper to remove these packages
12. Enable redis
Sometimes redis is not enabled after the upgrade
systemctl --now enable redis@grommunio.service
13. Restart MariaDB to force the DB upgrade
systemctl restart mariadb
14. Check that AppArmor is disabled, disable AppArmor if it is enabled
systemctl status apparmor --no-pager
If you see a message like Active: active (exited), stop, disable and mask AppArmor!
systemctl --now disable apparmor
systemctl mask apparmor
15. Re-enable timesync
The SuSE 15.6 upgrade removes timesyncd, so we need another NTP daemon. A good solution is chrony.
Check for an installed NTP daemon with rpm -qa | grep -e timesync -e ntp
, if no NTP daemon is installed, install chrony:
zypper in chrony
systemctl unmask chronyd
systemctl --now enable chronyd
16. Reboot the server to activate the new modules and new kernel
init 6
17. Check for failed services
systemctl --failed
We should not see any failed services. If you have failed services, repair these errors and start all services.
Check again that AppArmor is disabled:
systemctl status apparmor --no-pager
If you see a message like Active: active (exited), disable as explained in step 15.
18. Document the upgrade
rpm -qa | sort > /root/SLES_15.6.txt
19. Compare old state with current state
vim -d /root/SLES_15.6.txt /root/SLES_15.5.txt
It is unlikely that you will find missing packages but if you do, reinstall them as follow
zypper in <MISSING-PACKAGE>
Ignore obsolete kernel and libfmt7-7* packages and old grup2 packages.
20. Find newer sample configuration files, these usually have the extension .rpmnew
find /* -iname '*.rpmnew'
Manually migrate the changes from the .rpmnew file into the original configuration file, this can be done with vim or diff. However, be careful not to overwrite or destroy the configuration of your system. Note: we made a backup of the configuration in the third step.
vim -d <FILE> <FILE>.rpmnew
or use diff
diff <FILE> <FILE>.rpmnew
and manually edit the configuration file to reflect the changes.
This requires some knowledge of the system, as overwriting the wrong variables may render your system unusable.
In /etc/postfix/master.cf, replace fifo
with unix
. The fifo
transport is obsolete.
sed -i.bak 's/fifo/unix/g' /etc/postfix/master.cf
Do not touch this file: /etc/postfix/main.cf
It is also a good idea to migrate any new/updated comments from .rpmnew to the configuration file and remove any outdated comments.
After making the changes to the configuration files, delete the .rpmnew files, they are no longer needed.
Also restart the affected services or reboot the server again with init 6
.
21. Find and delete outdated configuration files, these usually have the extension .rpmsave
find /* -iname '*.rpmsave'
Manually delete any obsolete configuration files, they are no longer needed.
22. Check at the logs for errors
journalctl -f
and tail /var/log/nginx/*.log -f
23. Remove obsolete kernels
Check how many kernels are located in /boot
?
ls -lar /boot
If you have more than two kernels, purge the obsolete kernels:
zypper purge-kernels
24. Finalize the upgrade
run the grommunio update script to finalize the upgrade:
grommunio-update update
25. Test the system
Note that postfix is still disabled, so sending mails is not yet possible.
Fix any errors.
26. When everything works, enable and start postfix
systemctl --now enable postfix
and delete the snapshot
27. Now the system should be fully up and running again
Enjoy grommunio
Changes:
- Simplified update process
- Some commands summarised as one line
- 24. Finalize the upgrade