Skip to content

Unified Backups: Refactor task definitions usage in Backup::Manager

What does this MR do and why?

A couple of refactors in Backup::Manager:

  • Rename definitions to backup_tasks to describe it better
  • Refactor usages of task_id to pass task instead
  • Improve specs related to the changes above

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Similar to the other refactors, this should not break any existing backup functionality, as its not adding or modifying any existing behavior:

Run rake gitlab:backup:create

2024-02-20 14:49:46 UTC -- Dumping database ...
Dumping PostgreSQL database gitlabhq_development ... [DONE]
Dumping PostgreSQL database gitlabhq_development_ci ... [DONE]
2024-02-20 14:49:50 UTC -- Dumping database ... done
...
2024-02-20 14:49:54 UTC -- Backup 1708440586_2024_02_20_16.10.0-pre is done.
2024-02-20 14:49:54 UTC -- Deleting backup and restore PID file ... done
  1. Go to tmp/backups

  2. Unpack the generated tar file:

    tar zxvf 1708440586_2024_02_20_16.10.0-pre_gitlab_backup.tar
  3. It should include all backed up content

Related to #427337 (closed)

Edited by Gabriel Mazetto

Merge request reports

Loading