Gitlab-rake gitlab:import:repos... but all statistics are 0?


I did a gitlab-rake gitlab:import:repos[’/tmp/r’] to import all my repos from an old gitlab instance into a new one. It seemed to work great except that the statistics are not updated.

Looking at any repo in gitlab, there is a lot of files and commits but in the top just below the Project ID it says 0 commits, 0 tags, 0 bytes Files, 0 bytes Storage. Also if I click a user I see in Overview that the graph is entirely empty.

Is there an error here or is there a rake command I need to run to update statistics maybe?

I am on latset Gitlab CE downloaded using the ubuntu package manager. 13.7.1 (c97c8073a0e)

Kind regards

The stats are typically auto-computed after some write-activity on the repositories, but if you’d like to force a calculate it you can leverage The Rails Console | GitLab and trigger a manual refresh, following: GitLab Rails Console Cheat Sheet | GitLab

If the number of projects is not too high, you can iterate over all of them (warning: do not perform this if your project count is over 50-100, as it can overwhelm the service due to continuous disk-intensive work, run it on specific or batch of project IDs as shown above instead):

# For a list of gathered project IDs
PROJECT_IDS = [431, 130, 523, 918]
PROJECT_IDS.each do |p|

# For every project, across the board
# See _WARNING_ above
Project.all.each do |p|