Gitlab - How to restore / migrate a non Cloudron Gitlab
-
@girish TOP! Will try it out on Monday.
2021-09-27 11:16:52 +0000 -- Cleaning the database ... 2021-09-27 11:16:54 +0000 -- done 2021-09-27 11:16:54 +0000 -- Restoring database ... Restoring PostgreSQL database dbd5499e3cf81b43d093724d69fa223688 ... ERROR: must be owner of extension btree_gist ERROR: must be owner of extension pg_trgm . . . ALTER TABLE ALTER TABLE [DONE] 2021-09-27 11:17:24 +0000 -- done 2021-09-27 11:17:24 +0000 -- Restoring repositories ... rake aborted! TypeError: no implicit conversion of nil into String /home/git/gitlab/lib/backup/gitaly_backup.rb:75:in `absolute_path' /home/git/gitlab/lib/backup/gitaly_backup.rb:75:in `bin_path' /home/git/gitlab/lib/backup/gitaly_backup.rb:28:in `start' /home/git/gitlab/lib/backup/repositories.rb:47:in `restore' /home/git/gitlab/lib/tasks/gitlab/backup.rake:124:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/backup.rake:80:in `block (3 levels) in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' Tasks: TOP => gitlab:backup:repo:restorehmm
-
2021-09-27 11:16:52 +0000 -- Cleaning the database ... 2021-09-27 11:16:54 +0000 -- done 2021-09-27 11:16:54 +0000 -- Restoring database ... Restoring PostgreSQL database dbd5499e3cf81b43d093724d69fa223688 ... ERROR: must be owner of extension btree_gist ERROR: must be owner of extension pg_trgm . . . ALTER TABLE ALTER TABLE [DONE] 2021-09-27 11:17:24 +0000 -- done 2021-09-27 11:17:24 +0000 -- Restoring repositories ... rake aborted! TypeError: no implicit conversion of nil into String /home/git/gitlab/lib/backup/gitaly_backup.rb:75:in `absolute_path' /home/git/gitlab/lib/backup/gitaly_backup.rb:75:in `bin_path' /home/git/gitlab/lib/backup/gitaly_backup.rb:28:in `start' /home/git/gitlab/lib/backup/repositories.rb:47:in `restore' /home/git/gitlab/lib/tasks/gitlab/backup.rake:124:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/backup.rake:80:in `block (3 levels) in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' Tasks: TOP => gitlab:backup:repo:restorehmm
I added a full
--tracelog here https://paste.cloudron.dev/mocukugoho.md -
I added a full
--tracelog here https://paste.cloudron.dev/mocukugoho.md@brutalbirdie great success! that exact error is what I fixed in package v1.55.3 . Are you using that package version?
I think you can also make it work in older packages with adding the line in
/app/data/gitlab.yml:backup: gitaly_backup_path: /home/git/gitaly/gitaly-backup -
@brutalbirdie great success! that exact error is what I fixed in package v1.55.3 . Are you using that package version?
I think you can also make it work in older packages with adding the line in
/app/data/gitlab.yml:backup: gitaly_backup_path: /home/git/gitaly/gitaly-backupApp Title and Version GitLab 14.2.3 App ID d5499e3c-f81b-43d0-9372-4d69fa223688 Package Version com.gitlab.cloudronapp@1.55.3 Last Updated 3 days agoBtw. The Gitlab Version in this information is wrong, the version should be
14.2.4since this is the version running in this release tag.
So I am running thev1.55.3
I will addgitaly_backup_path: /home/git/gitaly/gitaly-backuptobackup:and try again, after a app restart. -
@brutalbirdie great success! that exact error is what I fixed in package v1.55.3 . Are you using that package version?
I think you can also make it work in older packages with adding the line in
/app/data/gitlab.yml:backup: gitaly_backup_path: /home/git/gitaly/gitaly-backup@girish
The last error2021-09-28 06:36:02 +0000 -- Restoring container registry images ... rake aborted! Errno::ENOENT: No such file or directory - /app/data/backups/registry.tar.gz /home/git/gitlab/lib/backup/files.rb:95:in `run_pipeline!' /home/git/gitlab/lib/backup/files.rb:60:in `restore' /home/git/gitlab/lib/tasks/gitlab/backup.rake:277:in `block (4 levels) in <top (required)>' /home/git/gitlab/lib/tasks/gitlab/backup.rake:86:in `block (3 levels) in <top (required)>' /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' Tasks: TOP => gitlab:backup:registry:restore (See full trace by running task with --trace)But I think I can ignore this one since the old gitlab simply did not backup the registry.
Now the gitlab goes thru testing by his Owner. -
@brutalbirdie great success! that exact error is what I fixed in package v1.55.3 . Are you using that package version?
I think you can also make it work in older packages with adding the line in
/app/data/gitlab.yml:backup: gitaly_backup_path: /home/git/gitaly/gitaly-backup@girish The https://DOMAIN.TLD//admin/runners return error code 500.
This should be a problem with the migrated secrets.
The secrets where agitlab-secrets.jsonI converted thejsontoyaml.After that I noticed that
gitlab_railsshould beproduction.
Some more testing... -
@girish The https://DOMAIN.TLD//admin/runners return error code 500.
This should be a problem with the migrated secrets.
The secrets where agitlab-secrets.jsonI converted thejsontoyaml.After that I noticed that
gitlab_railsshould beproduction.
Some more testing...Ahhh finally.
I deleted theregistry:part in thesecrets.yamland now runners are accessible again!After a final testing by the owner, I will write up a doc for this type of migration.
-
Ahhh finally.
I deleted theregistry:part in thesecrets.yamland now runners are accessible again!After a final testing by the owner, I will write up a doc for this type of migration.
Looks like we are all good now.
I will submit a PR for the docs on gitlab for a migration step.
-
@brutalbirdie great success! that exact error is what I fixed in package v1.55.3 . Are you using that package version?
I think you can also make it work in older packages with adding the line in
/app/data/gitlab.yml:backup: gitaly_backup_path: /home/git/gitaly/gitaly-backuphttps://git.cloudron.io/cloudron/docs/-/merge_requests/28
I created a PR for this topic as a guide.
Have fun reading and fixing my mistakes
(if there is something to change hit me up in a dm/chat/PR) -
https://git.cloudron.io/cloudron/docs/-/merge_requests/28
I created a PR for this topic as a guide.
Have fun reading and fixing my mistakes
(if there is something to change hit me up in a dm/chat/PR) -
B BrutalBirdie referenced this topic on
-
B BrutalBirdie referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login