Upgrading ubuntu to 22.04 with check_mk installed

CMK version: raw Version: 2.1.0p19
OS version: - ubuntu 20.04.5 lts

Is there a proper way to upgrade ubuntu 20.04 lts to 22.04 lts with check_mk? I have tried it a couple of times and it fails because check_mk is installed. If not is there a way to export the configuration of check_mk so it can be imported into a new ubuntu that is 22.04?

Hi,

the checkmk version needs to match the operating system, so inplace updates without further actions will not work.
What you can do is

  • create a backup or a vm snapshot
  • stop your checkmk sites (omd stop)
  • disable the checkmk sites (omd disable)
  • first note down and then remove the softlink pointing from /omd/sites/<your site>/version to /omd/versions/
*ls -l /omd/sites/*/version*
*rm /omd/sites/*/version*
  • uninstall checkmk completely
    dpkg -l | grep check-mk
    apt-get remove <package-names>

do the release upgrade

  • After that install the exact same checkmk version package for 22.04
  • recreate the soft link(s)
cd /omd/sites/<yoursite>
ln -s ../../versions/2.1.0p19.cre /omd/sites/<yoursite>/version
chown --no-dereference <yoursiteuser:yoursiteuser> /omd/sites/monitoring/version
  • enable the sites (omd enable yoursite)
  • start the sites (omd start)
2 Likes

Will I lose all my settings and hosts?

No you won’t. We currently have a ticket for documenting this kind of update. There is a stub describing a marginally different procedure in Update to version 2.1.0, but this has to be explained much better.

Hello,
any updates on the matter? :slight_smile:

Here it is. I did my homework.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.