Database backups
Schedule database backups to an S3 destination, keep the latest N, and test a run manually.
Back up Postgres, MySQL, MariaDB, MongoDB and libSQL databases on a cron schedule. Redis has no database backups.
Before you start
- S3-compatible storage. Add it in Backups › Storage (see destinations).
Configure a backup
Open the database's Backups tab and click Create backup.
| Setting | What it does | Default |
|---|---|---|
| Destination | Storage that holds the backups. | None |
| Database | Name of the database to dump. | None |
| Schedule | Cron expression. | None |
| Prefix destination | Path under which files are stored in the bucket. | None |
| Custom file name | Optional name prepended to each file's timestamp. | Empty |
| Keep the latest | Optional. Keep only the latest N backups. | Empty (keep all) |
| Enabled | Turns the schedule on or off. | On |
Databases inside Compose
A database running in a Compose service is backed up from the Compose service's Settings › Storage and backups section. Besides the settings above, set:
| Setting | What it does |
|---|---|
| Database type | PostgreSQL, MariaDB, MySQL or MongoDB. |
| Service name | The compose service that runs the database. |
Verify
Click Run manual backup (play icon) next to the backup, then check the bucket for the new file.
