> ## Documentation Index
> Fetch the complete documentation index at: https://doc.trycapsule.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Backups

> View, trigger, and restore backups from the dashboard.

The **Backups** page shows every backup stored for your account, across all connections and servers.

***

## Backup list

Each backup entry shows:

| Field      | Description                                        |
| ---------- | -------------------------------------------------- |
| Connection | The connection name (e.g., `prod-postgres`)        |
| Server     | Which server ran the backup                        |
| Status     | `success` or `failed`                              |
| Size       | Compressed, encrypted size                         |
| Created at | When the backup completed                          |
| Expires at | When it will be deleted per your retention setting |

***

## Triggering a backup

Click **Backup now** on any connection row to trigger an on-demand backup immediately. You'll be prompted for an optional note — useful for recording *why* you're taking this backup (e.g. "before v2.4 migration", "pre-deploy safety net"), so you can recognize it later in the list instead of just seeing a timestamp. Leave it blank if you don't need one.

The dashboard sends a signal to the agent on your server — the backup runs locally and uploads the result. The backup, including your note if you added one, appears in the list within seconds of completing.

***

## Restoring a backup

Click **Restore** on any backup row. The dashboard sends a restore signal to the agent on your server. The agent:

1. Downloads the encrypted file from cloud storage
2. Verifies the SHA-256 checksum
3. Decrypts it locally using your local key
4. Pipes it into the target database

<Warning>
  Restoring overwrites the current contents of the target database. You will be asked to confirm in the dashboard before the restore signal is sent.
</Warning>

The restore runs entirely on your server. Capsule's servers do not see the decrypted data.

***

## Failed backups

Failures appear in the list with a `failed` status and an error message. Failures are always surfaced in the dashboard — even dump-stage failures that produce no uploaded file.

Common reasons for failure:

* Database tools not installed (`capsule doctor` to check)
* Database credentials changed
* Database server unreachable
* Disk space exhausted during dump

***

## Retention and expiry

Backups are deleted automatically when they reach the retention limit you configured on the schedule, or when your plan's maximum retention period is reached. The **Expires at** column shows when each backup will be removed.

To keep a backup longer, upgrade your retention setting on the schedule or your plan.
