Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. GitLab
  3. Gitlab App - Can't create backup within the app

Gitlab App - Can't create backup within the app

Scheduled Pinned Locked Moved Solved GitLab
9 Posts 3 Posters 2.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • BrutalBirdieB Offline
    BrutalBirdieB Offline
    BrutalBirdie
    Partner
    wrote on last edited by
    #1

    What am I trying to do? Something similar to:
    https://forum.cloudron.io/topic/5704/gitlab-how-to-restore-migrate-a-non-cloudron-gitlab

    But I need to migrate the Cloudron Gitlab away to a dedicated Server due to resource issues and customer wishes.

    Error:

    root@26622ff4-eec8-4ac4-be62-55703ffff82c:~/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
    `/home/git` is not writable.
    Bundler will use `/tmp/bundler20220623-490-1xzsyv7490' as your home directory temporarily.
    2022-06-23 07:59:32 +0000 -- Dumping database ... 
    Dumping PostgreSQL database db26622ff4eec84ac4be6255703ffff82c ... [DONE]
    2022-06-23 07:59:37 +0000 -- Dumping database ... done
    2022-06-23 07:59:37 +0000 -- Dumping repositories ... 
    rake aborted!
    Backup::Error: gitaly-backup binary not found and gitaly_backup_path is not configured
    /home/git/gitlab/lib/backup/gitaly_backup.rb:109:in `bin_path'
    /home/git/gitlab/lib/backup/gitaly_backup.rb:46:in `start'
    /home/git/gitlab/lib/backup/repositories.rb:18:in `dump'
    /home/git/gitlab/lib/backup/manager.rb:90:in `run_create_task'
    /home/git/gitlab/lib/backup/manager.rb:54:in `block in create'
    /home/git/gitlab/lib/backup/manager.rb:53:in `each'
    /home/git/gitlab/lib/backup/manager.rb:53:in `create'
    /home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
    /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
    /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
    Tasks: TOP => gitlab:backup:create
    (See full trace by running task with --trace)
    

    note:
    Ddefining the gitaly_backup_path in the /app/data/gitlab.yml did not solve the problem.

    Like my work? Consider donating a drink. Cheers!

    fbartelsF 1 Reply Last reply
    0
    • BrutalBirdieB BrutalBirdie marked this topic as a question on
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by girish
      #8

      Good catch! The gitaly-backup binary's path changed recently. The config has to be fixed.

      -    gitaly_backup_path: /home/git/gitaly/gitaly-backup
      +    gitaly_backup_path: /home/git/gitaly/bin/gitaly-backup
      

      I am making a new package. For existing packages, just change the path in /app/data/gitlab.yml as above.

      1 Reply Last reply
      1
      • BrutalBirdieB BrutalBirdie

        What am I trying to do? Something similar to:
        https://forum.cloudron.io/topic/5704/gitlab-how-to-restore-migrate-a-non-cloudron-gitlab

        But I need to migrate the Cloudron Gitlab away to a dedicated Server due to resource issues and customer wishes.

        Error:

        root@26622ff4-eec8-4ac4-be62-55703ffff82c:~/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
        `/home/git` is not writable.
        Bundler will use `/tmp/bundler20220623-490-1xzsyv7490' as your home directory temporarily.
        2022-06-23 07:59:32 +0000 -- Dumping database ... 
        Dumping PostgreSQL database db26622ff4eec84ac4be6255703ffff82c ... [DONE]
        2022-06-23 07:59:37 +0000 -- Dumping database ... done
        2022-06-23 07:59:37 +0000 -- Dumping repositories ... 
        rake aborted!
        Backup::Error: gitaly-backup binary not found and gitaly_backup_path is not configured
        /home/git/gitlab/lib/backup/gitaly_backup.rb:109:in `bin_path'
        /home/git/gitlab/lib/backup/gitaly_backup.rb:46:in `start'
        /home/git/gitlab/lib/backup/repositories.rb:18:in `dump'
        /home/git/gitlab/lib/backup/manager.rb:90:in `run_create_task'
        /home/git/gitlab/lib/backup/manager.rb:54:in `block in create'
        /home/git/gitlab/lib/backup/manager.rb:53:in `each'
        /home/git/gitlab/lib/backup/manager.rb:53:in `create'
        /home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
        /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
        /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
        Tasks: TOP => gitlab:backup:create
        (See full trace by running task with --trace)
        

        note:
        Ddefining the gitaly_backup_path in the /app/data/gitlab.yml did not solve the problem.

        fbartelsF Offline
        fbartelsF Offline
        fbartels
        App Dev
        wrote on last edited by
        #2

        Hi @BrutalBirdie,

        https://docs.gitlab.com/ee/raketasks/backup_restore.html#gitaly-backup-for-repository-backup-and-restore

        speaks about specifying the option directly in one of the ruby files, did you try that out as well already?

        BrutalBirdieB 1 Reply Last reply
        0
        • fbartelsF fbartels

          Hi @BrutalBirdie,

          https://docs.gitlab.com/ee/raketasks/backup_restore.html#gitaly-backup-for-repository-backup-and-restore

          speaks about specifying the option directly in one of the ruby files, did you try that out as well already?

          BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by
          #3

          @fbartels did not try that but also what's the point when he also can't find the binary as well.

          Like my work? Consider donating a drink. Cheers!

          fbartelsF 1 Reply Last reply
          0
          • BrutalBirdieB BrutalBirdie

            @fbartels did not try that but also what's the point when he also can't find the binary as well.

            fbartelsF Offline
            fbartelsF Offline
            fbartels
            App Dev
            wrote on last edited by
            #4

            @BrutalBirdie in the past I had to adjust $PATH for a few things within the Cloudron app container, so I thought that may be the case here as well.

            In general gitaly-backup can be found in the container I assume?

            BrutalBirdieB 1 Reply Last reply
            0
            • fbartelsF fbartels

              @BrutalBirdie in the past I had to adjust $PATH for a few things within the Cloudron app container, so I thought that may be the case here as well.

              In general gitaly-backup can be found in the container I assume?

              BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote on last edited by BrutalBirdie
              #5

              @fbartels

              @fbartels said in Gitlab App - Can't create backup within the app:

              In general gitaly-backup can be found in the container I assume?

              I am not sure what exactly you mean to be found. The config variable or the file?
              Will tinker around a bit.

              Like my work? Consider donating a drink. Cheers!

              BrutalBirdieB 1 Reply Last reply
              0
              • BrutalBirdieB BrutalBirdie

                @fbartels

                @fbartels said in Gitlab App - Can't create backup within the app:

                In general gitaly-backup can be found in the container I assume?

                I am not sure what exactly you mean to be found. The config variable or the file?
                Will tinker around a bit.

                BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote on last edited by BrutalBirdie
                #6

                eh what?
                Now if I configure the gitaly_backup_path: "/app/data/gitaly_backups" and restart the app I get this error.

                root@682bad9d-d3a7-4cc4-ae7e-d580c33a95b0:~/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
                `/home/git` is not writable.
                Bundler will use `/tmp/bundler20220623-372-1k6ylrl372' as your home directory temporarily.
                2022-06-23 14:34:55 +0000 -- Dumping database ... 
                Dumping PostgreSQL database db682bad9dd3a74cc4ae7ed580c33a95b0 ... [DONE]
                2022-06-23 14:35:00 +0000 -- Dumping database ... done
                2022-06-23 14:35:00 +0000 -- Dumping repositories ... 
                rake aborted!
                Errno::EACCES: Permission denied - /app/data/gitaly_backups/
                /home/git/gitlab/lib/backup/gitaly_backup.rb:46:in `start'
                /home/git/gitlab/lib/backup/repositories.rb:18:in `dump'
                /home/git/gitlab/lib/backup/manager.rb:90:in `run_create_task'
                /home/git/gitlab/lib/backup/manager.rb:54:in `block in create'
                /home/git/gitlab/lib/backup/manager.rb:53:in `each'
                /home/git/gitlab/lib/backup/manager.rb:53:in `create'
                /home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
                /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
                /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
                Tasks: TOP => gitlab:backup:create
                (See full trace by running task with --trace)
                

                But the permissions for that folder are for the user git and even 777

                Like my work? Consider donating a drink. Cheers!

                fbartelsF 1 Reply Last reply
                0
                • BrutalBirdieB BrutalBirdie

                  eh what?
                  Now if I configure the gitaly_backup_path: "/app/data/gitaly_backups" and restart the app I get this error.

                  root@682bad9d-d3a7-4cc4-ae7e-d580c33a95b0:~/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
                  `/home/git` is not writable.
                  Bundler will use `/tmp/bundler20220623-372-1k6ylrl372' as your home directory temporarily.
                  2022-06-23 14:34:55 +0000 -- Dumping database ... 
                  Dumping PostgreSQL database db682bad9dd3a74cc4ae7ed580c33a95b0 ... [DONE]
                  2022-06-23 14:35:00 +0000 -- Dumping database ... done
                  2022-06-23 14:35:00 +0000 -- Dumping repositories ... 
                  rake aborted!
                  Errno::EACCES: Permission denied - /app/data/gitaly_backups/
                  /home/git/gitlab/lib/backup/gitaly_backup.rb:46:in `start'
                  /home/git/gitlab/lib/backup/repositories.rb:18:in `dump'
                  /home/git/gitlab/lib/backup/manager.rb:90:in `run_create_task'
                  /home/git/gitlab/lib/backup/manager.rb:54:in `block in create'
                  /home/git/gitlab/lib/backup/manager.rb:53:in `each'
                  /home/git/gitlab/lib/backup/manager.rb:53:in `create'
                  /home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block (3 levels) in <top (required)>'
                  /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
                  /home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
                  Tasks: TOP => gitlab:backup:create
                  (See full trace by running task with --trace)
                  

                  But the permissions for that folder are for the user git and even 777

                  fbartelsF Offline
                  fbartelsF Offline
                  fbartels
                  App Dev
                  wrote on last edited by
                  #7

                  @BrutalBirdie the way i am reading the documentation gitaly-backup is a "binary"/executable, not the path the backup is written to.

                  1 Reply Last reply
                  0
                  • girishG girish moved this topic from Support on
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #8

                    Good catch! The gitaly-backup binary's path changed recently. The config has to be fixed.

                    -    gitaly_backup_path: /home/git/gitaly/gitaly-backup
                    +    gitaly_backup_path: /home/git/gitaly/bin/gitaly-backup
                    

                    I am making a new package. For existing packages, just change the path in /app/data/gitlab.yml as above.

                    1 Reply Last reply
                    1
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      Works after fixing the path .

                      root@34645fd4-1a6a-4d03-9dfb-9123208954aa:~/gitlab# sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
                      `/home/git` is not writable.
                      Bundler will use `/tmp/bundler20220623-326-4sq0sl326' as your home directory temporarily.
                      2022-06-23 17:38:30 +0000 -- Dumping database ... 
                      Dumping PostgreSQL database db34645fd41a6a4d039dfb9123208954aa ... [DONE]
                      2022-06-23 17:38:39 +0000 -- Dumping database ... done
                      2022-06-23 17:38:39 +0000 -- Dumping repositories ... 
                      {"command":"create","gl_project_path":"gitlab-instance-7c84d838/Monitoring","level":"info","msg":"started create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git","storage_name":"default","time":"2022-06-23T17:38:40.750Z"}
                      {"command":"create","error":"manager: repository empty: repository skipped","gl_project_path":"gitlab-instance-7c84d838/Monitoring","level":"warning","msg":"skipped create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git","storage_name":"default","time":"2022-06-23T17:38:40.776Z"}
                      {"command":"create","gl_project_path":"gitlab-instance-7c84d838/Monitoring.wiki","level":"info","msg":"started create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.wiki.git","storage_name":"default","time":"2022-06-23T17:38:41.125Z"}
                      {"command":"create","gl_project_path":"gitlab-instance-7c84d838/Monitoring","level":"info","msg":"started create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.design.git","storage_name":"default","time":"2022-06-23T17:38:41.129Z"}
                      {"command":"create","error":"manager: repository empty: repository skipped","gl_project_path":"gitlab-instance-7c84d838/Monitoring","level":"warning","msg":"skipped create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.design.git","storage_name":"default","time":"2022-06-23T17:38:41.133Z"}
                      {"command":"create","error":"manager: repository empty: repository skipped","gl_project_path":"gitlab-instance-7c84d838/Monitoring.wiki","level":"warning","msg":"skipped create","relative_path":"@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.wiki.git","storage_name":"default","time":"2022-06-23T17:38:41.145Z"}
                      2022-06-23 17:38:41 +0000 -- Dumping repositories ... done
                      2022-06-23 17:38:41 +0000 -- Dumping uploads ... 
                      2022-06-23 17:38:41 +0000 -- Dumping uploads ... done
                      2022-06-23 17:38:41 +0000 -- Dumping builds ... 
                      2022-06-23 17:38:41 +0000 -- Dumping builds ... done
                      2022-06-23 17:38:41 +0000 -- Dumping artifacts ... 
                      2022-06-23 17:38:41 +0000 -- Dumping artifacts ... done
                      2022-06-23 17:38:41 +0000 -- Dumping pages ... 
                      2022-06-23 17:38:41 +0000 -- Dumping pages ... done
                      2022-06-23 17:38:41 +0000 -- Dumping lfs objects ... 
                      2022-06-23 17:38:41 +0000 -- Dumping lfs objects ... done
                      2022-06-23 17:38:41 +0000 -- Dumping terraform states ... 
                      2022-06-23 17:38:41 +0000 -- Dumping terraform states ... done
                      2022-06-23 17:38:41 +0000 -- Dumping container registry images ... [DISABLED]
                      2022-06-23 17:38:41 +0000 -- Dumping packages ... 
                      2022-06-23 17:38:41 +0000 -- Dumping packages ... done
                      2022-06-23 17:38:41 +0000 -- Creating backup archive: 1656005910_2022_06_23_15.0.3_gitlab_backup.tar ... 
                      2022-06-23 17:38:41 +0000 -- Creating backup archive: 1656005910_2022_06_23_15.0.3_gitlab_backup.tar ... done
                      2022-06-23 17:38:41 +0000 -- Uploading backup archive to remote storage  ... [SKIPPED]
                      2022-06-23 17:38:41 +0000 -- Deleting tar staging files ... 
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/backup_information.yml
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/db
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/uploads.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/builds.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/artifacts.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/pages.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/lfs.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/terraform_state.tar.gz
                      2022-06-23 17:38:41 +0000 -- Cleaning up /app/data/backups/packages.tar.gz
                      2022-06-23 17:38:41 +0000 -- Deleting tar staging files ... done
                      2022-06-23 17:38:41 +0000 -- Deleting old backups ... [SKIPPED]
                      2022-06-23 17:38:41 +0000 -- Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data 
                      and are not included in this backup. You will need these files to restore a backup.
                      Please back them up manually.
                      2022-06-23 17:38:41 +0000 -- Backup 1656005910_2022_06_23_15.0.3 is done.
                      
                      1 Reply Last reply
                      1
                      • BrutalBirdieB BrutalBirdie has marked this topic as solved on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search