# Database Backup

## Download and Decrypt Your Servoy Cloud Database Backups

Servoy Cloud provides secure, encrypted database backups through Cloud Control Center. Follow these steps to download and decrypt your backup files for local restoration.

## 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="/files/NwAt0nzaJdrvvYuGSviv" alt="Servoy Cloud GNUPG installer window showing Kleopatra component selection"><figcaption><p>Windows GNUPG Installer with Kleopatra Component</p></figcaption></figure></div>

**Mac:**

1. Install GPG using brew:

   ```bash
   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="/files/mqK29pf4dGSTP0sZHK0O" alt="Servoy Cloud GNUPG passphrase entry dialog in Kleopatra"><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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.servoy.com/reference/servoy-cloud/database-backup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
