Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G git-backup
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • git-backup
  • Merge requests
  • !15

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Alain Takoudjou requested to merge alain.takoudjou/git-backup:fix/database into master Feb 03, 2026
  • Overview 5
  • Commits 1
  • Changes 1

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.

Edited Feb 04, 2026 by Alain Takoudjou
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/database
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7