Backing up Gitlab on Linode Object Storage

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

In This Guide

GitLab is a complete solution for all aspects of your software development. At its core, GitLab serves as your centralized remote Git repository. GitLab also features built-in tools that represent every task in your development workflow, from planning to testing to releasing.

All modern GitLab installations additionally include tooling to create backups on Linode’s Object Storage using a single command. This guide will describe the process for initially setting up an Object Storage Bucket which can be used to remotely store backups created directly from Gitlab.

Before you Begin

  • Follow the guide for Deploying Gitlab Through the Linode Marketplace to completion, or otherwise ensure that a Gitlab installation is available and accessible over SSH.

  • Create an Object Storage access key and a bucket. See the Manage Access Keys and Create and Manage Buckets](/docs/products/storage/object-storage/guides/manage-buckets/) guides.

Configuring Gitlab For Object Storage Backups

In order to configure Gitlab on Linode’s Object Storage, the Gitlab instance must first be Accessed Directly Over SSH. To do this, enter the following command, replacing the username and IP address with the unique username and IP address of your Linode:

ssh username@

Once access has been gained, using a text editor of your choice, edit the ‘/etc/gitlab/gitlab.rb’ configuration file to reflect the following:

sudo nano /etc/gitlab/gitlab.rb
File: /etc/gitlab/gitlab.rb
gitlab_rails['backup_upload_connection'] = {
  'provider' => 'AWS',
  'region' => 'us-east-1',
  'endpoint'    => '',
  'aws_access_key_id' =>YOUR_ACCESS_KEY,
  'aws_secret_access_key' =>YOUR_SECRET_KEY,
gitlab_rails['backup_upload_remote_directory'] = 'bucketname'

The following chart will explain each configuration settings in additional detail:

providerAWS (The provider must be set to AWS because it is dependent on s3cmd)
regionThe region the bucket was created in. A full list of regions can be found in the Product Documentation.
endpointThe endpoint url for the data center. Uses the syntax of
aws_access_key-idThe Object Storage Access Key created in a previous step.
aws_secret_access_keyThe Object Storage Secret Key created in a previous step.
gitlab_rails['backup_upload_remote_directory']The label of the bucket created during bucket creation.

Once the configuration settings are completed, apply the configuration with the following command:

gitlab-ctl reconfigure

Creating a Backup

Once configured, backups can now be created for your gitlab instance at any time by using the following command:

gitlab-backup create

Once complete, the backup will be freely available in a compressed .tar file within the Object Storage bucket, and can be observed directly in the Linode Cloud Manager.

This page was originally published on

Your Feedback Is Important

Let us know if this guide was helpful to you.

Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.
The Disqus commenting system for Linode Docs requires the acceptance of Functional Cookies, which allow us to analyze site usage so we can measure and improve performance. To view and create comments for this article, please update your Cookie Preferences on this website and refresh this web page. Please note: You must have JavaScript enabled in your browser.