Backing up Gitlab from my docker instance to S3

Following these instructions:
https://docs.gitlab.com/ee/raketasks/backup_restore.html
https://web.archive.org/web/20200209002603/https://docs.gitlab.com/ee/raketasks/backup_restore.html

The caveats here are : I’m running the gitlab-omnibus-ce in docker
It mounts all of it’s data (etc and var) at /virt/gitlab

# Make the backup
docker exec -t gitlab gitlab-backup create BACKUP=gitlab-full-backup

# Put the backup somewhere good
s3cmd put /virt/gitlab/var/opt/gitlab/backups/gitlab-full-backup_gitlab_backup.tar s3://go.rottenboat.co/gitlab/etc/gitlab/gitlab.rb

# Copy gitlab.rb and gitlab-secrets.json
s3cmd put /virt/gitlab/etc/gitlab/gitlab.rb s3://go.rottenboat.co/gitlab/etc/gitlab/gitlab.rb
s3cmd put /virt/gitlab/etc/gitlab/gitlab-secrets.json s3://go.rottenboat.co/gitlab/etc/gitlab/gitlab-secrets.json

I saved all of that to a file called “backup_gitlab.sh” which I run daily on a cron job.


Comments and Messages

I won't ever give out your email address. I don't publish comments but if you'd like to write to me then you could use this form.

Issac Kelly