# Backups every night

> Every database is backed up every night to object storage outside the server, encrypted with your organisation's key. Restore any day with one command. Coming next: continuous backups, to restore any minute of the last 7 days.

## What is backed up

Postgres databases (MySQL and Valkey once they arrive), and the volumes of your containers. Code isn't, because it lives in git and every deployment can be rebuilt.

| what | how |
| --- | --- |
| `databases` | nightly, consistent snapshot at 03:00 UTC |
| `volumes` | nightly, with the databases |
| `where` | Cloudflare R2, outside the server |
| `encryption` | your organisation's key, before it leaves |

## List backups

Each backup is named by its date. Ask for them in the console under the database, or from the terminal.

```sh
$ 00b5e2 db backups ls db --json
[{"date":"2026-11-23T03:00:00Z","size":"184 MB","status":"ok"},...]
```

## Restore by date

Restore into a new database to check it first, or over the current one. Restoring over it takes a backup of the current state first, so you can go back.

```sh
$ 00b5e2 db restore db --date 2026-11-21 --into db-check
restored 2026-11-21 into db-check
$ 00b5e2 db restore db --date 2026-11-21
```

_Also via MCP: restore_database_

> Restoring a production database is always explicit and, for an agent, needs a token with the db and deploy:prod scopes. A deploy token can't do it.

## Backup now

Before a risky migration, take one by hand. It is kept like the nightly ones.

```sh
$ 00b5e2 db backups create db
backup created: 2026-11-23 10:42 UTC
```

Previous: [Alerts](https://docs.00b5e2.com/alerts.md)
Next: [CLI](https://docs.00b5e2.com/cli.md)
