GitLab Docker restore

I have a backup from a CentOS8 gitlab server that I am migrating to a Docker instance. The version of gitlab I was running on the server was 13.5.4. I am pulling the same version on the docker container. I placed the “dump_gitlab_backup.tar” file in the “data/backups” folder on the host machine which is the volume for “/var/opt/gitlab” in the container. I have ran the following command from the host and from within the container and I keep getting the following error message. “gitlab-rake gitlab:backup:restore --trace”

I have checked that the file it is complaining about exists and the permissions are correct.

root@gitlab:/# gitlab-rake gitlab:backup:restore --trace

** Invoke gitlab:backup:restore (first_time)

** Invoke gitlab_environment (first_time)

** Invoke environment (first_time)

** Execute environment

Rails Error: Unable to access log file. Please ensure that /opt/gitlab/embedded/service/gitlab-rails/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /opt/gitlab/embedded/service/gitlab-rails/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

rake aborted!

Errno::EACCES: Permission denied @ rb_sysopen - /opt/gitlab/embedded/service/gitlab-rails/log/application.log

Hi, was your backup from a docker install? If not then it won’t work. Backups can only be restored to the same type. Therefore, if the backup was taken from a Gitlab Omnibus installation, it can only be restored to a Gitlab Omnibus installation. The same for Gitlab source install, can only be restored to a source install. Gitlab Docker can only be restored to Gitlab Docker. You cannot restore between versions, eg: gitlab docker to gitlab omnibus or the other way around.

OK. Is there a migration plan from a Omnibus install to a Docker install?

Since a migration relies on doing a backup/restore then no. Your best bet is export all the projects and then import them: Project import/export | GitLab

You can from the new server import from the old server using the web interface, but you won’t get issues, etc. So the import/export option is really the only way you’d be able to do that.