Backup fails with "Permission denied" error
Hello,
I'm desperately getting this error while trying to backup my gitlab setup. It's a from source installation.
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
WARNING: This installation of GitLab uses a deprecated syntax for 'config/database.yml'. The support for this syntax will be removed in 15.0. More information can be found here: https://gitlab.com/gitlab-org/gitlab/-/issues/338182
2022-03-22 00:22:58 +0100 -- Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
2022-03-22 00:23:01 +0100 -- done
2022-03-22 00:23:01 +0100 -- Dumping repositories ...
rake aborted!
Errno::EACCES: Permission denied - /home/git/gitlab/tmp/gitaly-backup
/home/git/gitlab/lib/backup/gitaly_backup.rb:34:in `start'
/home/git/gitlab/lib/backup/repositories.rb:13:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:111:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:13:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `each'
/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/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/home/git/gitlab/vendor/bundle/ruby/2.7.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => gitlab:backup:repo:create
(See full trace by running task with --trace)
After many many many attempts to make it work, I ended up thinking it's a gitlab bug, but I don't understand what I could have done to trigger it...