Switch repository backups to use manifests only
What does this MR do and why?
Fixes gitaly#5490 (closed)
Manifests have been generated for repository backups since gitaly!6391 (merged)
This change means that we no longer generate pointer layout backups and instead use manifest files alone. See https://gitlab.com/gitlab-org/gitaly/-/blob/master/doc/gitaly-backup.md#manifest-layout
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
Numbered steps to set up and validate the change are strongly suggested.
- Remove any existing backups. This just helps prevent any cross-pollination.
$ rm -rf tmp/backups/*
- Switch to
master
and generate a backup. Skip db to make this less intrusive.$ git switch master $ bundle exec rake gitlab:backup:create SKIP=db ... 2024-02-13 22:16:30 UTC -- Backup 1707862589_2024_02_13_16.9.0-pre is done.
- Make some obvious changes to a repository (this is so we can detect that restoring did something).
- Switch to
repository_backup_manifest_only
and restore from the just created backup. If there are no repository restores that say "completed restore", i.e. they're all skipped, then something has gone wrong.$ git switch repository_backup_manifest_only $ bundle exec rake gitlab:backup:restore BACKUP=1707862589_2024_02_13_16.9.0-pre ... {"command":"restore","gl_project_path":"snippets/19","level":"info","msg":"completed restore","pid":414426,"relative_path":"@snippets/94/00/9400f1b21cb527d7fa3d3eabba93557a18ebe7a2ca4e471cfe5e4c5b4ca7f767.git","storage_name":"default","time":"2024-02-13T22:19:22.446Z"} ... 2024-02-13 22:19:44 UTC -- Restore task is done.
- Repeat the above process but instead of creating a backup in
master
, create a backup inrepository_backup_manifest_only
. -
🎉 🎉 🎉 🎉 🎉
Edited by James Fargher