Consistently load backup manifest
What does this MR do and why?
Previously it was not clear whether one should use settings
or
backup_information
. This resulted in both being used inconsistently.
Instead of silently loading backup information, we explicitly load or
build the information depending.
Now that we can rely on backup information being consistent, this means we can now start using it to detect when tasks are skipped instead of adhoc reading from ENV.
Eventually we'll use this consistency to be able to pass a backup ID to the backup tasks.
How to set up and validate locally
-
Create a backup.
$ bundle exec rake gitlab:backup:create ... Creating backup archive: 1644531746_2022_02_11_14.8.0-pre_gitlab_backup.tar ... done Uploading backup archive to remote storage ... skipped Deleting tmp directories ... done done done done done done done done done done Deleting old backups ... skipping Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data and are not included in this backup. You will need these files to restore a backup. Please back them up manually. Backup task is done.
-
Restore from the backup. Note that
BACKUP
does not take a full path.$ bundle exec rake gitlab:backup:restore BACKUP=1644531746_2022_02_11_14.8.0-pre ...
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by James Fargher