Unable to login as root after backup restore

I have a backup from an gitlab-ce server which is no longer in service. I would like to access a couple projects from the backup. My plan was to restore the backup, then log in as root, and export projects.

I followed instructions to restore the backup from https://docs.gitlab.com/ee/raketasks/backup_restore.html#restore-gitlab.

The backup was from 12.1.11, I set up a docker container from that image version of gitlab. Logged in as root and made sure it was working. I stopped services: unicorn, puma, sidekiq. I restored using gitlab-rake gitlab:backup:restore BACKUP=""`. It appears to restore everything without error. Then I reconfigured and restarted as per instructions.

When I go to the login page. The page is displayed as normal with the exception that there is no username or password field or signin button (see image below). This makes it impossible to log in.

The server where the backup came from was connected via LDAP for authentication, but that is also no longer available. However, I only need to log in as root.

I am able to do a docker exec and verify that data tables appear to be there and have data I would expect.

I tried upgrading a few versions of gitlab to see if that would resolve it with no luck.

any ideas how I might get the username/password fields to show up so I could log in as root?

Ultimately my goal is to export several projects. If there were a way to do that via docker exec... or gitlab-rake ... that would be all I need.

Any help is much appreciated.

After a bit more searching I discovered Import Project page which describes using rake to import a project. From that I was able to find that one could also use the command:

# gitlab-rake "gitlab:import_export:export[root,mygroup,myproject,target.tar.gz]"

to export a project. I’ve been able to successfully export a project using this method, and import the project on another instance of gitlab using New Project -> Import Project

1 Like

Sounds interesting. In my experience, Gitlab Container uses a single Directory. The specific location must be mounted before starting the Container.
I’ve never done a Backup like described above, I’m always using rsync to push all the Data into the Gitlab Container and back.

What you might also try is find the LDAP Setting, maybe in the gitlab.rb config file, and then boot the specific GitLab CE Container with an updated version of the gitlab.rb?

Yes kihyoun you are right. Kihyoun can you help me that how can I take backup of any website which is hosted on any platform. can you guide me how can I do that.