Uninstalled the gitlab and installed again , than respositories are present in the backend but not visible in the UI

Uninstalled the gitlab and installed again , than respositories are present in the backend but not visible in the UI

checked with the rake tasks only 2 projects could see. but in /var/opt/gitlab/git-data/repositories they are more than 20 projects.
need those respositories back

Check /var/opt/gitlab/backups directory to see if you have backups, then follow backup/restore guide: Back up and restore GitLab | GitLab

Uninstalling it, you deleted the database, only the repository files remained on the disk. So installing it again, you just ended up with a clean installation. Was a mistake to do that, but you can fix it by restoring your backup. Assuming of course you do have a backup?

1 Like

Backup file is not there
Seems it got deleted when uninstalling the gitlab.

Need to those repositories to continue my work
/Var/opt/gitlab/git-data/repositories/@hashed seems some data is there

Any workaround is there to have that data
Can I export the data from server itself or can we zip data
@iwalker. Any workaround is there to have the data back please suggest

You can try this: Migrate data from dead Gitlab-CE instance using only local files, backup corrupted! - #3 by kahshmick

If you look at the xxxx.git/config file it should show something like:

    fullpath = namespace/project

where namespace is the Gitlab group/namespace, and where project is the name of the repository. That will help you identify what hashed directory is what project. Then you can use the commands from the link to see if that will help you recover on the new server.

However, you have two big problems here. First, you don’t have any backups of your server which would have saved you all these problems in the first place - so you need to make sure you have backups. Second, why did you uninstall Gitlab and then install it again? What did you think that would achieve? That is a destructive action which is what destroyed your install. You shouldn’t have done it.

1 Like

Will try today

My current version is 15.x
Need to downgrade it to 13.so when downgrading server dint came up
So did the uninstall and installed again
Which is a very bad idea
My projects missed
I really need them

Downgrading doesn’t always work, especially if there is a big difference in versions. Going from a 15.x to maybe the latest 14.x might be OK, but even in such a scenario it can fail.

Would have been better to check all the log files before attempting the downgrade. Also, before you start anything like that you have to make backups in case things go wrong. You should even be making backups before upgrading as well or any other potentially destructive task.

tried the above solutin,dint helped
for few repos able to get the data but branches are missing and also data is not upto to date.
and for few repos those commands not workin

any help please


All I can suggest is hopefully you have these repositories cloned on some computers/laptops somewhere. Commit and push these to the new installation. You might not have all the latest changes, but at least it would be better than nothing.

If not, then as you see, without a proper backup, it’s extremely difficult if not impossible to recover.

Yes its hard if there is no backup .
Thankyou for the suggestions.

its working with the steps you have mentioned,

  • go to /repositories/@hashed
  • cd into “//”. This is a bare git repository that was on your server
  • git remote add origin “”
  • git push --all origin
    with the above commands we will get the data of master branch.

---->to get the data from all the branches .
we need to checkout every branch and do the push

  • git remote add origin “”
  • git push --all origin

By this i was able to get my data
Thankyou @iwalker for your help

1 Like