{"id":367,"date":"2017-11-11T04:13:57","date_gmt":"2017-11-11T03:13:57","guid":{"rendered":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=367"},"modified":"2017-11-11T04:13:57","modified_gmt":"2017-11-11T03:13:57","slug":"upgrading-check-mk-and-debian","status":"publish","type":"post","link":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=367","title":{"rendered":"Upgrading check-mk and Debian"},"content":{"rendered":"<h3>1. Overview<\/h3>\n<p>Upgrading Debian from 8 (jessie) to 9 (stretch) with check-mk installed isn&#8217;t as easy as it seems. You have to:<\/p>\n<ol>\n<li>Upgrade check-mk to 1.4.0 and fix all issues<\/li>\n<li>Backup all sites<\/li>\n<li>Purge check-mk<\/li>\n<li>Upgrade debian<\/li>\n<li>Reinstall check-mk 1.4.0<\/li>\n<li>Restore the check-mk-sites from backup<\/li>\n<\/ol>\n<h3>2. Upgrade check-mk and back it up<\/h3>\n<p>Download the .deb package and install it. Follow the official\u00a0<a href=\"http:\/\/mathias-kettner.com\/cms_update.html\">the official guide<\/a>\u00a0and upgrade all sites. After fixing all issues, create a backup of each site:<\/p>\n<pre># su - &lt;sitename&gt;\r\n$ omd backup site.name.tar.gz<\/pre>\n<p>Repeat this for all sites.<\/p>\n<h3>3. Remove check-mk and upgrade to stretch<\/h3>\n<p>Stop sites:<\/p>\n<pre># su - &lt;sitename&gt;\r\n$ omd stop<\/pre>\n<p>Repeat this for all sites. Then remove (purge) check-mk:<\/p>\n<pre># dpkg -P check-mk-raw-1.4.0p17<\/pre>\n<p>Once this is done, update the distribution to debian (you really should know how to do that!). Autoremove all obsolete packages and reboot.<\/p>\n<h3>4. Reinstall check-mk and restore from backup<\/h3>\n<p>Download the .deb package for stretch and install it. Since you autoremoved dependent packages earlier, the install will most likely fail. Fix it with:<\/p>\n<pre># apt --fix-broken install<\/pre>\n<p>Now we can restore the sites from our backup (as root!):<\/p>\n<pre># omd restore &lt;site-name.tar.gz&gt;\r\n# su - sitename\r\n$ omd start<\/pre>\n<p>Repeat for all sites and fix all remaining issues.<\/p>\n<h3>5. Notes<\/h3>\n<p>Of course you don&#8217;t want to do this without a security net. Take a snapshot and destroy that instead of the real VM. How to do that with KVM and libvirt is explained\u00a0<a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=359\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Overview Upgrading Debian from 8 (jessie) to 9 (stretch) with check-mk installed isn&#8217;t as easy as it seems. You have to: Upgrade check-mk to 1.4.0 and fix all issues Backup all sites Purge check-mk Upgrade debian Reinstall check-mk 1.4.0 Restore the check-mk-sites from backup 2. Upgrade check-mk and back it up Download the .deb &hellip; <a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=367\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Upgrading check-mk and Debian<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[27,69],"class_list":["post-367","post","type-post","status-publish","format-standard","hentry","category-check_mk","tag-check_mk","tag-debian"],"_links":{"self":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367"}],"version-history":[{"count":1,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions\/368"}],"wp:attachment":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}