How to achieve Disaster Recovery objectives for self managed GitLab Community Edition

Problem to solve

How to achieve Disaster Recovery objectives for self managed GitLab Community Edition?

  1. I have taken GitLab Backup using regular backup command in GitLab
  2. I also took EC2 instance snapshots of volumes of my GitLab server

Which is the best option to achieve disaster recovery?
Option 1: Backup & Restore on new VM using existing GitLab backup
Option 2: Setting up new VM and use snapshot to create that VM

My current GitLab version is 16.9.1 Community Edition Self managed
What are the precautions one need to take in Option 1 and Option 2 methods?

*Thanks for taking the time :blush:

Both would work, problem is option 2 limits you to where you can use that snapshot - most likely only on EC2. Option 1 allows you to restore it anywhere and on any server/VPS. You can also restore it to any OS that Gitlab supports. For example, my Gitlab instance is on Debian, but I can restore it to RHEL/CentOS/Rocky if I want or even Ubuntu.

Don’t forget you also need /etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json from your server as well as the backup from /var/opt/gitlab/backups directory.

The real question is how flexible you want to be in your recovery requirements. If you will only use in EC2, then a snapshot is OK, but even so it still cannot be compared to a proper backup.

Thanks @iwalker
I would also like to congratulate you for being nominated as Most Valuable Person(MVP) of this(Feb) month.
I truly appreciate your contribution and efforts in answering queries posted in GitLab forum.

2 Likes