Commit 9b2d4539 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Kirill Smelkov
Browse files

contrib/gitlab-backup: get database configs from gitlab database base models

Backup::Database class does not have config anymore since in gitlab it's now
possible to configure many databases.

We need now to get config from base_model: https://lab.nexedi.com/nexedi/gitlab-ce/-/blob/v15.11.13-nxd/lib/gitlab/database/each_database.rb#L39
If more than one databases gitlab can backup and restore them: https://lab.nexedi.com/nexedi/gitlab-ce/-/blob/v15.11.13-nxd/lib/backup/database.rb#L75
This feature is not supported for now.

For our gitlab, we only use `main` database so base_model count is always 1. This
patch will raise if there is more than one databases configured because gitlab-backup
cannot handle it for now.

/reviewed-by @jerome
/reviewed-on kirr/git-backup!15
parent d9b0f2e4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment