# Database Backup

## Overview

In Cloud Control Center, you can securely download encrypted database backups.\
Follow these steps to access and decrypt your backup files.

## How to get backup file

### Step 1: Download encrypted backup file

Go to the Databases section within Applications > Environments to find instructions on downloading the backup file.

{% hint style="warning" %}
This menu item is only available when you have the permission role: `Administrator`
{% endhint %}

### Step 2: Get Decryption Passphrase

After downloading the database backup file, an email is sent with the corresponding GPG decryption passphrase.

### Step 3: Download and Install GNUPG (when not installed in your computer)

**Windows:**

The backup files downloaded from the Control Center are encrypted. To decrypt them, you will need GNUPG, an external software.

1. [Download](https://www.gpg4win.org/) the Binary Release Installer for the full featured GNUPG
2. Install GNUPG, including Kleopatra, the user interface for easy decryption.

   <div align="left"><figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-76c76d24271c8e284cd26bb7efdb001e35e9d1ff%2Fgnupg-components.png?alt=media" alt=""><figcaption><p>Windows GNUPG Installer with Kleopatra Component</p></figcaption></figure></div>

**Mac:**

1. Install GPG using brew: `brew install gpg`

### Step 4: Decrypt backup file

Now that GNUPG is installed:

**Windows:**

1. Locate the backup file you downloaded from the Control Center
2. Open file using Kleopatra
3. Choose an output folder for the decrypted backup file
4. Enter the passphrase generated earlier, which was retrieved by email

   <div align="left"><figure><img src="https://3933488479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjpWd52BKwABWxF2lScUK%2Fuploads%2Fgit-blob-1927122f193960b58506e967e880af8044f9cdb2%2Fgnupg-passphrase.png?alt=media" alt=""><figcaption><p>Windows passphrase prompt</p></figcaption></figure></div>
5. After decryption is done, a save dialog will be shown where to save the file.

**Mac:**

1. Open Terminal
2. Locate the backup file you downloaded from the Control Center
3. Run `gpg -d mybackup.backup.gpg > mybackup.backup`\
   Where `mybackup` should be replaced with the correct name.
4. Enter the passphrase generated earlier, which was retrieved by email
5. After decryption is done, a new file will be there with the previous given name

### Step 5: Restore the Backup

Now you can restore the DB Backup using your DB Tool.
