# PostgreSQL, MariaDB, Redis

> Add a managed, backed-up database, link it to your application, and what happens to its data.

Source: https://docs.fransys.cloud/en/projets/bases-de-donnees/ Checked against the console on 2026-10-23.

## Add a database

In the project, click **Add a service**, then **Database**: managed by Fransys, with backups. Choose the engine: PostgreSQL, MariaDB or Redis.

Quicker: from an application, **Add a linked service**. The new database is linked to the application as soon as Fransys has prepared it (up to 2 minutes).

On the diagram, a database card shows its engine, its version and its disk size.

## Configure the database

- **Engine** and, for PostgreSQL, **PostgreSQL version**.
- **Disk size**: the space for the data. Volumes are billed per GB (see [Pricing](https://docs.fransys.cloud/en/budget/grille-tarifaire/)).
- **On first start**: **Empty database**, or **From a backup** (see [Backups and restore](https://docs.fransys.cloud/en/exploiter/sauvegardes/)).
- **Backup schedule** and **Retention (days)**.

## Link it to your application

Linking an application to a database injects the database's connection variables into it: host, port, credentials. See [Linking services](https://docs.fransys.cloud/en/projets/relier-des-services/).

By default, a database has no public address: only the project's services can reach it.

## Remote access

To reach the database from your own machine (an SQL client, a one-off migration), turn on **Allow remote access to the database**. Turn it off as soon as you no longer need it: a database open to the internet is protected only by its credentials.

> **Two databases with the same engine**
> If an application is linked to two databases with the same engine (two Redis, for example), they provide the same variable names. Fransys refuses to deploy until you've renamed them, in the panel of the service that receives them.

## Backups

PostgreSQL, MariaDB and Redis databases are backed up automatically, following the database's **Backup schedule** and **Retention**. The panel lists its latest backups, with their size and status. To restore, see [Backups and restore](https://docs.fransys.cloud/en/exploiter/sauvegardes/).

## What erases the data

- **Delete the database**: its data is deleted at the next deployment.
- **Taking the project or the cluster offline**: the database loses its data. When it comes back online, it starts from its latest backup only if its restore source is set to itself; otherwise, it starts empty.
- **Unlinking the database** from an application: the data stays intact. The application no longer receives the connection variables.
