From: stephan48 Date: Wed, 6 Mar 2024 01:14:14 +0000 (+0100) Subject: (no commit message) X-Git-Url: https://blog.stejau.de/gitweb/gitweb.cgi?a=commitdiff_plain;h=c3d4dc522fa5b162ce98abc9e77032b8fa1b5925;p=stejau-blog.git --- diff --git a/posts/2024-03-06-restore-gitlab.mdwn b/posts/2024-03-06-restore-gitlab.mdwn index 8f3906c..a2483ec 100644 --- a/posts/2024-03-06-restore-gitlab.mdwn +++ b/posts/2024-03-06-restore-gitlab.mdwn @@ -1,5 +1,9 @@ This is opinionated for gitlab.xiph.org, the old VM is a buster, the new one a bookworm. + +Our situation is that due to some failed spam bot cleanup some legitimate users where deleted, we want to restore their issue data, but we only have an old DB backup from just before the occurence. +We will restore this and then upgrade our way up to the version on "prod", after which we will restore everything except the DB to get a more complete setup, we then need to find a way to restore the objects for the problematic users(which we have to identity - we know some). + - Get a VM - Follow https://about.gitlab.com/install/#debian until just before installing gitlab itself - Make sure to downgrade the apt sources list as needed if your OS is too new for the old gitlab version(for me bullseye worked) :/ @@ -146,9 +150,29 @@ gitlab-ctl restart redis apt install gitlab-ce=16.2.9-ce.0 ``` -- After we are finished, gitlab wants us to upgrade postgres - we oblige +- Restart redis again + +``` +gitlab-ctl restart redis +``` + +- Wait for the instance coming up and check background migrations - it actually had to do stuff here + +- Do the next step (hint you can add "-d" to already download the package while waiting...) + +``` +apt install -d gitlab-ce=16.3.7-ce.0 +apt install gitlab-ce=16.3.7-ce.0 +``` + +- Wait for the instance coming up and check background migrations - it actually had to do stuff here + +- Do the next step (hint you can add "-d" to already download the package while waiting...) ``` -gitlab-ctl pg-upgrade -V 14 +apt install -d gitlab-ce=16.7.6-ce.0 +apt install -d gitlab-ce=16.9.1-ce.0 +apt install gitlab-ce=16.7.6-ce.0 ``` +...