Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #1125

Closed
Open
Created Jul 22, 2012 by Administrator@rootOwner

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

Assignee
Assign to
Time tracking