rake gitlab:app:backup_[create|restore]
Created by: mrrooijen
Hi,
First of all, amazing job with GitLab. I'm loving it so far. Got pretty much everything working in just a few minutes which is very satisfying.
I have a question (or rather I think it might be a minor bug) regarding these tasks:
rake gitlab:app:backup_create # GITLAB | Create a backup of the gitlab system
rake gitlab:app:backup_restore # GITLAB | Restore a previously created backup
Now, creating the backup to me seems very straightforward, simple run the first rake task and it'll bundle/tar the repositories and dumb the database. When I run the backup_restore
rake task it seems that the database is properly restored (I created some fake tickets to see if it would revert and it looks like it did). However, the git repositories don't restore and, in fact, when you visit the git repository page you see that initial screen where it says to do the initial "push" to the repository. However, when I backed up the repository I had already pushed the repository. So, just to see what happens I tried to push my local repository to the remote and now I get the following error:
myproject git:master ❯ git push origin master
fatal: '/home/git/repositories/myproject.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
It turns out that it restored the backup as /home/git/repositories/MyProject.git
instead of the previous /home/git/repositories/myproject.git
. Performing the following commands fixed the issue:
cd /home/git/repositories/
mv MyProject.git myproject.git
I also didn't have to push because it did restore correctly, it just named the git repository wrong (capitalized, while it should've been lowercased). Although my project name registered in GitLab was indeed MyProject
it did allow me to just use domain.com:myproject.git
when I initially created the project, and it accepted it. But why would it not accept this same remote after restoring a repository from a backup?
Again, excellent system, busy migrating all my stuff over.
Cheers