(no commit message)
authorstephan48 <stephan48@web>
Wed, 6 Mar 2024 20:22:13 +0000 (21:22 +0100)
committerIkiWiki <ikiwiki.info>
Wed, 6 Mar 2024 20:22:13 +0000 (21:22 +0100)
posts/2024-03-06-restore-gitlab.mdwn

index 3091c531a0c42a12117ccc8d757d696a12fa6961..cf4ff567dd91d261d9d1d5305a375ee325e45e8a 100644 (file)
@@ -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.
 
 ...