Initial support for gitaly server-side backups
What does this merge request do and why?
Adds initial configuration to enable gitaly server-side backups using the included minio.
How to set up and validate locally
-
Switch GDK to this branch:
$ cd <gdk_root> $ git switch gitaly_server_side_backups
-
Turn on object storage.
gdk.yml
:object_store: enabled: true
-
Reconfigure and restart.
$ gdk reconfigure && gdk restart
-
Open minio in a browser and create a bucket named
gitaly-backups
if one doesn't already exist.- URL: http://127.0.0.1:9000
- User: minio
- Pass: gdk-minio
-
In gitlab, create a server-side backup (skip db so it's faster and less invasive):
$ cd <gdk_root>/gitlab $ bundle exec rake gitlab:backup:create REPOSITORIES_SERVER_SIDE=true SKIP=db ... 2023-08-09 03:02:04 UTC -- Backup 1691550107_2023_08_09_16.3.0-pre is done. 2023-08-09 03:02:04 UTC -- Deleting backup and restore PID file ... done
-
You can browse minio and verify that a bunch of stuff was added
🎉 🎉 -
Try restore from said backup:
$ bundle exec rake gitlab:backup:restore BACKUP=1691550107_2023_08_09_16.3.0-pre ...
-
The output will have a lot of "skipped" errors. This is just how repositories that don't exist are handled at the moment. Hopefully there will be some successful ones, they'll print
completed restore
:{"command":"restore","gl_project_path":"jashkenas/Underscore","level":"info","msg":"completed restore","relative_path":"@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.git","storage_name":"default","time":"2023-08-09T03:06:48.899Z"}
Impacted categories
The following categories relate to this merge request:
-
gdk-reliability - e.g. When a GDK action fails to complete. -
gdk-usability - e.g. Improvements or suggestions around how the GDK functions. -
gdk-performance - e.g. When a GDK action is slow or times out.
Merge request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise an issue to follow-up. -
Documentation added/updated, if needed. -
Announcement added, if change is notable. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Edited by James Fargher