Docs: backup dockerized gitlab
Hi guys,
I'm struggling to configure backups of my Omnibus instance and would like to ask for an update in the docs. It's great that there exists doc/settings/backups.md
(which is pretty detailed), but maybe there's still space to help those who's GitLab is dockerized.
Current solution relies on cron
on the host, setting which somewhat contradicts the philosophy of Docker. If I decide to move to a new server, I'd have to manually orchestrate some internal container's behaviour with an external trigger, which does not look like a common usage pattern. It is also not very clear what exactly to execute inside the container and where best to output the result of the backup.
A desired scenario for me as any lazy Docker user would be to define an extra Docker volume, tell Docker that this is a link to AWS S3 and then simply start the GitLab service with this volume. A couple of extra ENV
variables or lines in GITLAB_OMNIBUS_CONFIG
could do all the magic. It would be ideal if there was an interface to control the frequency of backups or even to make this frequency gradually increasing (e.g. to keep 1/hr for the last day, 1/day for the last week, 1/week for the last 3 months and 1/month forever).
I'm not familiar with version-controlled S3 buckets well, but my intuition says that there is also an opportunity to leverage the history of backups to S3 by keeping backup data "unzipped" and "rsyncing" it somehow with S3 incrementally (my repos may have tones of LFS objects and moving them each time over the wire just to backup a couple of new lines of code seems not very efficient in terms of time, network and costs). This would work somewhat like TimeMachine on Macs.
What do you think about extending backups.md
? How are Dockerized GitLab instances being safely backed-up these days? I'd be happy with any robust "do this once and forget" recipe :–)