# Data

> PostgreSQL, MySQL, MongoDB, Redis, disks, tasks, and templates.

Web page: /docs/cli/data/

A database, a disk, and a template install all use the project and environment you have selected. Create that pair first. [dflow context:show](/docs/cli/project/context-show) prints it.

[dflow db:postgres:create](/docs/cli/data/db-postgres-create) starts PostgreSQL. `dflow db:mysql:create` starts MySQL. `dflow db:mongodb:create` starts MongoDB. [dflow db:redis:create](/docs/cli/data/db-redis-create) starts Redis. The Redis provider id is `redis`. PostgreSQL, MySQL, and MongoDB require `--database`, the name inside the engine. [dflow db:link](/docs/cli/data/db-link) connects a ready database to an application and redeploys it. Linking writes `DFLOW_DATABASE_*` for PostgreSQL, MySQL, and MongoDB, and `DFLOW_REDIS_*` for Redis. [dflow db:credentials](/docs/cli/data/db-credentials) shows the password once.

`--storage` on each create command defaults to `20Gi`. A size from `1Gi` through `100Gi` is accepted. PostgreSQL `--version` is `16`, `17`, or `18`, and the default is `18`. MySQL `--version` is `8.0` or `8.4`, and the default is `8.0`. MongoDB `--version` is `6`, `7`, or `8`, and the default is `8`. Redis has no version flag.

MongoDB is one instance, still a replica set.

When the object store driver is `s3`, a new PostgreSQL, MySQL, or Redis database gets a daily backup at 02:00 UTC, five-field cron `0 2 * * *`, kept 7 days. Point-in-time restore is on for those three. MongoDB backups are not available. On MongoDB, `dflow db:backups:list`, `dflow db:backups:create`, and `dflow db:restore` return that backups are not available. Deleting a database does not delete the bucket copy. Delete and restore still ask you to confirm the name.

A volume is a disk mounted into the application. A job is a task that runs and exits, or a task on a schedule. A template installs a ready-made application into the current environment.

- [dflow db:postgres:create](/docs/cli/data/db-postgres-create)
- `dflow db:mysql:create`
- `dflow db:mongodb:create`
- [dflow db:redis:create](/docs/cli/data/db-redis-create)
- [dflow db:list](/docs/cli/data/db-list)
- [dflow db:info](/docs/cli/data/db-info)
- [dflow db:credentials](/docs/cli/data/db-credentials)
- [dflow db:link](/docs/cli/data/db-link)
- [dflow db:delete](/docs/cli/data/db-delete)
- [dflow db:backups:list](/docs/cli/data/db-backups-list), [dflow db:backups:create](/docs/cli/data/db-backups-create), and [dflow db:restore](/docs/cli/data/db-restore)
- [dflow volumes:create](/docs/cli/data/volumes-create), [dflow volumes:list](/docs/cli/data/volumes-list), [dflow volumes:inspect](/docs/cli/data/volumes-inspect), [dflow volumes:mount](/docs/cli/data/volumes-mount), [dflow volumes:umount](/docs/cli/data/volumes-umount), [dflow volumes:expand](/docs/cli/data/volumes-expand), and [dflow volumes:delete](/docs/cli/data/volumes-delete)
- [dflow jobs:create](/docs/cli/data/jobs-create), [dflow jobs:schedule](/docs/cli/data/jobs-schedule), [dflow jobs:logs](/docs/cli/data/jobs-logs), and [dflow jobs:delete](/docs/cli/data/jobs-delete)
- [dflow groups:create](/docs/cli/data/groups-create) and [dflow groups:list](/docs/cli/data/groups-list)
- [dflow templates:list](/docs/cli/data/templates-list) and [dflow templates:install](/docs/cli/data/templates-install)
