{"id":306,"date":"2023-08-03T09:17:12","date_gmt":"2023-08-03T09:17:12","guid":{"rendered":"https:\/\/d-mashina.net\/?p=306"},"modified":"2023-08-03T09:17:12","modified_gmt":"2023-08-03T09:17:12","slug":"upgrade-docker-gitlabce-12-x-to-13-0-x-with-postgres-upgrade","status":"publish","type":"post","link":"https:\/\/d-mashina.net\/index.php\/2023\/08\/03\/upgrade-docker-gitlabce-12-x-to-13-0-x-with-postgres-upgrade\/","title":{"rendered":"Upgrade Docker GitlabCE 12.x to 13.0.x with Postgres upgrade"},"content":{"rendered":"<div class=\"reader-article-content reader-article-content--legacy-html\" dir=\"ltr\">\n<p>Repair corrupted upgrade:<\/p>\n<p>Simply copy config to restarting container<\/p>\n<pre spellcheck=\"false\">touch config\r\ndocker cp config gitlab:\/opt\/gitlab\/sv\/redis\/log\r\ndocker cp config gitlab:\/var\/log\/gitlab\/gitaly\r\ndocker cp config gitlab:\/opt\/gitlab\/sv\/gitaly\/log\r\ndocker cp config gitlab:\/opt\/gitlab\/sv\/postgresql\/log\r\n\r\n<\/pre>\n<p>Gitlab will be started properly on next restart. But if you destroy image then you must run commands again. This doesn&#8217;t happened with newest or latest version 13.2.x. But to use latest, you need to upgrade Postgres database.<\/p>\n<p>For upgrading Postgres you will need to make backup, then destroy container and delete volume from old container, create new container and import data from backup.<\/p>\n<pre spellcheck=\"false\">docker-compose exec -T service_name pg_dumpall -U username &gt; pgdump\r\n\r\n\r\n<\/pre>\n<pre spellcheck=\"false\">docker exec -i container_name psql -U username &lt; pgdump\r\n\r\n<\/pre>\n<p>Hope, that this will help.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Repair corrupted upgrade: Simply copy config to restarting container touch config docker cp config gitlab:\/opt\/gitlab\/sv\/redis\/log docker cp config gitlab:\/var\/log\/gitlab\/gitaly docker cp config gitlab:\/opt\/gitlab\/sv\/gitaly\/log docker cp config gitlab:\/opt\/gitlab\/sv\/postgresql\/log Gitlab [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,39],"tags":[],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-linux","category-opensource"],"_links":{"self":[{"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":1,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/posts\/306\/revisions\/307"}],"wp:attachment":[{"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/d-mashina.net\/index.php\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}