# dflow db:backups:create

> Request a backup of a PostgreSQL, MySQL, or Redis database.

Web page: /docs/cli/data/db-backups-create/

This requests a backup of a PostgreSQL, MySQL, or Redis database. With `--wait`, it polls until the backup is completed. The database has to be ready, and the object store driver has to be `s3`. When that driver is `s3`, the service already has a daily backup at 02:00 UTC, five-field cron `0 2 * * *`, kept 7 days. This command asks for one backup now. MongoDB backups are not available. The command returns that backups are not available.

```bash
dflow db:backups:create SOURCE
```

## Flags

By default the request is saved in the environment draft. Run `dflow changes:deploy` to take the backup. `--trust-skip` queues the backup now instead. `--wait` defaults to true and applies to `--trust-skip`. `--wait-timeout` defaults to 5m.

## What you see

Without `--trust-skip` the terminal prints `staged (run: dflow changes:deploy)`. With `--trust-skip` it prints `service`, `backup`, `status`, and `id`, and with `--wait` it polls until the backup is completed. `--wait=false` returns when the request is accepted.

## When it fails

A database that is not ready, or that sits on a platform with no backups configured, exits 6. MongoDB returns that backups are not available. A failed backup exits 5 and the message names the cluster's reason when the API has one. A wait that ends first exits 7.
