Skip to content

Unified Backups: Refactor tasks and targets

Gabriel Mazetto requested to merge 427337-unified-backups-refactor-tools into master

What does this MR do and why?

  • Extract usages of Gitlab.config.backup.path into backup_path
  • Sync backup_id implementation from manager to remote_storage
  • Rename app_files_dir to storage_path into everything related to backup/targets
  • Extract STRATEGY env into Options

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