Book Image

GitLab Cookbook

By : Jeroen van Baarsen
Book Image

GitLab Cookbook

By: Jeroen van Baarsen

Overview of this book

Table of Contents (16 chapters)
GitLab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Restoring a backup


If your server breaks down, it is nice to have a backup. However, it's a pain when it's a full day's work to restore that backup; it's just a waste of time.

Luckily, GitLab makes it super easy to restore the backup. Retrieve the backup from your external Amazon S3 storage or just your external hard drive, copy the file to your server, and run the backup restore command. It won't get any easier!

Getting ready

Make sure you have a recent backup of your GitLab instance. After you restore the backup, all the data created between the backup creation and the restoration of your backup will be lost.

How to do it…

Let's restore a backup using the following steps:

  1. Start with a login to your server using SSH.

    The next few steps concentrate on the GitLab source installation.

  2. Go to your gitlab folder:

    $ cd /home/git/gitlab
    
  3. Go to the backup folder of GitLab:

    $ cd /home/git/gitlab/tmp/backups
    
  4. Look at the filename of the most recent file and note the number that the filename starts with.

  5. Go back...