API Endpoint for Backup on self-managed gitlab instance

:hugs:

Want to automate process of running backups and exploring options of using any API endpoint for same.

We have Linux package installation.

Thanks
Vivek

Hi @vshenwai1 :wave:

You can export individual projects via the API.

However, there is currently no API endpoint that can be used for backing up an entire GitLab instance worth of data. Documentation on how (and what) to backup for self-managed GitLab can be found here: https://docs.gitlab.com/ee/administration/backup_restore/backup_gitlab.html#backup-command
https://docs.gitlab.com/ee/administration/backup_restore/backup_gitlab.html

1 Like

Hi - there is gitlab-backup for which one needs to login into one of the rail servers to execute. As mentioned earlier purpose is to automate backup process and down the line recovery process. Since GitLab itself is platform automating tasks thru use of CI/CD it’s difficult to understand non-availability of API endpoint which can be called thru pipeline.

Pl. let me know if there is anything which can be used.

Thanks
Vivek

Backups of mission-critical data are generally not things that organizations automate via CI/CD pipelines, this is traditionally considered to be a systems administration task.

If you’d like to easily automate backups of GitLab data, I suggest using a cronjob.
https://docs.gitlab.com/omnibus/settings/backups.html.

Different configuration options for GitLab data backups can be found in gitlab.rb

Given the complexity and significant number of considerations that could be involved in developing a backup and restore strategy for disaster recovery, it’s not likely that we’ll implement an API endpoint that allows backing up all GitLab sever data anytime soon. You are welcome to open a feature request if this is something you’re interested in.

These are excellent resource that I think you’ll find informative and helpful for developing a backup strategy that works for you:

Hi Greg - Thanks. Yes I have gone thru these documents already which are quite detailed and helpful.

Thanks
Vivek