sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.87k stars 2.14k forks source link

Backup creation fails since 17.1.0 #2965

Closed tDo closed 2 months ago

tDo commented 3 months ago

After upgrading to the 17.1.x branch I noticed that the the automatic back creation would not create new backup-files anymore. Thus to check what's happening on the system, I tried to manually trigger the backup-task, which ran just fine until this last happened:

2024-07-02 08:14:40 +0200 -- Deleting tar staging files ... done
2024-07-02 08:14:40 +0200 -- Deleting backups/tmp ...
2024-07-02 08:14:40 +0200 -- Deleting backups/tmp ... done
2024-07-02 08:14:40 +0200 -- Deleting backup and restore PID file ... done
rake aborted!
Errno::ENOENT: No such file or directory @ rb_check_realpath_internal - /home/git/data/shared/external-diffs
/home/git/gitlab/lib/backup/targets/files.rb:178:in `realpath'
/home/git/gitlab/lib/backup/targets/files.rb:178:in `storage_realpath'
/home/git/gitlab/lib/backup/targets/files.rb:68:in `dump'
/home/git/gitlab/lib/backup/tasks/task.rb:25:in `backup!'
/home/git/gitlab/lib/backup/manager.rb:57:in `run_create_task'
/home/git/gitlab/lib/backup/manager.rb:145:in `block in run_all_create_tasks'
/home/git/gitlab/lib/backup/manager.rb:145:in `each_value'
/home/git/gitlab/lib/backup/manager.rb:145:in `run_all_create_tasks'
/home/git/gitlab/lib/backup/manager.rb:32:in `create'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:12:in `block in create_backup'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:75:in `lock_backup'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:10:in `create_backup'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:114:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => gitlab:backup:create

It seems that it's missing the folder "/home/git/data/shared/external-diffs". I'll check if just creating the folder helps in the process.

Still do you know of any change that happened between 17.0.x and 17.1.x which resulted in this behavior difference?

kkimurak commented 3 months ago

This should be caused by upstream change https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154914

I think we can take a similar approach to #2790 (fixed by #2901).

tDo commented 3 months ago

Also just verified that creating the folder manually with the git user as the owner also made the backup work again. So if anyone needs a quick workaround to create a backup for now.