From: stephan48 Date: Wed, 6 Mar 2024 20:22:13 +0000 (+0100) Subject: (no commit message) X-Git-Url: https://blog.stejau.de/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc042948921cbb870dd3428db582907bb655ac8c;p=stejau-blog.git --- diff --git a/posts/2024-03-06-restore-gitlab.mdwn b/posts/2024-03-06-restore-gitlab.mdwn index 3091c53..cf4ff56 100644 --- a/posts/2024-03-06-restore-gitlab.mdwn +++ b/posts/2024-03-06-restore-gitlab.mdwn @@ -180,7 +180,53 @@ apt install gitlab-ce=16.7.6-ce.0 ``` gitlab-ctl restart redis ``` + +- Wait for the instance coming up and check background migrations - it actually had to do stuff here again - this repetition is getting boring? ;) +- Do the next step (hint you can add "-d" to already download the package while waiting...) + +``` +apt install gitlab-ce=16.9.1-ce.0 +``` + +- Wait until its done +- You are now on the same version as the "prod" instance +- Copy over the Backup +- Place it inside /var/opt/gitlab/backups and chown it + +``` +mv 1709683168_2024_03_05_16.9.1_gitlab_backup.tar /var/opt/gitlab/backups/ +chown git: /var/opt/gitlab/backups/1709683168_2024_03_05_16.9.1_gitlab_backup.tar +``` + +- Before doing anything more, do a backup of the restored VM before the restore + +``` +gitlab-backup create +``` + +- We now have the backup 1709722674_2024_03_06_16.9.1_gitlab_backup.tar in /var/opt/gitlab/backups/ + +- We now restore the copied backup EXCEPT the db, this gives us some more logical context for our data + + +``` +gitlab-backup restore BACKUP=1709683168_2024_03_05_16.9.1 SKIP=db +``` + +- After this is done you should have all repodata back \o/ +- Do another backup just to be safe + +``` +gitlab-backup create +``` + +- We now get 1709724053_2024_03_06_16.9.1_gitlab_backup.tar + +- We are done \o/ + +We now got a point in time restore for the given old backup which was created by a gitlab before a upgrade. We only had a database backup, because thats all gitlab does. +The next steps are to find out how to reimport the previously lost issues back into the main instance. Maybe that will be another blog post. ...