On Docker "gitlab-rake gitlab:backup:restore " does nothing

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Created a docker with Gitlab CE 8.16.4 (because that's the one we are currently using, yeah.. I know)

Gitlab starts without any issue whatsoever, requests the root password and everything looks ok.

Then I copy the backup file onto /var/opt/gitlab/backups and follow the steps on gitlab-ce#14740 :

  • gitlab-ctl stop unicorn
  • gitlab-ctl stop sidekiq
  • chmod -R 775 /var/opt/gitlab/backups
  • I confirm there is a file 1527451819_2018_05_27_gitlab_backup.tar there and that inside that tar file we can find all repos. [Note: I've tried with and without the BACKUP=1527451819_2018_05_27 parameter cause I only have one file on backups; no change]
  • gitlab-rake gitlab:backup:restore --trace
root@<server>:/# gitlab-rake gitlab:backup:restore --trace
** Invoke gitlab:backup:restore (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute gitlab:backup:restore
Unpacking backup ... done
** Invoke gitlab:backup:repo:restore (first_time)
** Invoke environment
** Execute gitlab:backup:repo:restore
Restoring repositories ...
Put GitLab hooks in repositories dirs [DONE]
done
** Invoke gitlab:backup:builds:restore (first_time)
** Invoke environment
** Execute gitlab:backup:builds:restore
Restoring builds ...
done
** Invoke gitlab:backup:artifacts:restore (first_time)
** Invoke environment
** Execute gitlab:backup:artifacts:restore
Restoring artifacts ...
done
** Invoke gitlab:backup:lfs:restore (first_time)
** Invoke environment
** Execute gitlab:backup:lfs:restore
Restoring lfs objects ...
done
** Invoke gitlab:shell:setup (first_time)
** Invoke environment
** Execute gitlab:shell:setup
This will rebuild an authorized_keys file.
You will lose any data stored in authorized_keys file.
Do you want to continue (yes/no)? yes
** Invoke cache:clear (first_time)
** Invoke cache:clear:redis (first_time)
** Invoke environment
** Execute cache:clear:redis
** Execute cache:clear
Deleting tmp directories ... done
done
done
done
done
root@<server>:/#

No errors but no restore at all happened. I've set up one very similar system that is working, the main difference was that, in this case there was a -v /var/opt/gitlab/:/var/opt/gitlab/ (so the container is using the host directory).

What is the current bug behavior?

Not giving errors, not restoring either.

What is the expected correct behavior?

We should see the system unpacking all those repositories and copying all those repositories.

Edited Jun 22, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading