# Database syncing with Drupal

Source: https://docs.fortrabbit.com/guides/drupal/database
Published: 2026-11-15
Reviewed: 2026-11-15

> Move a Drupal database between DDEV and fortrabbit with frbit db pull and push, and import it locally with ddev import-db.


## Install and deploy run down

1. [Install Drupal locally](/guides/drupal/install)
2. [Deploy Drupal to fortrabbit](/guides/drupal/deployment)
3. **Database syncing** _← you are here_
4. [Files syncing](/guides/drupal/files)

## Database down

Pull the database once editors work on the live site, to develop locally with current content:



```shell
frbit db pull {{app-env-id}}
ddev import-db --file={{app-env-id}}.sql.gz
```

`frbit db pull` runs `mysqldump` on the environment over SSH and writes `{{app-env-id}}.sql.gz` to the current folder. No database password reaches the local machine. `ddev import-db` replaces the local database.

## Database up

Push the local database to bring a new site up, or to replace the live content on purpose:



```shell
ddev export-db --file=local.sql.gz
frbit db push local.sql.gz {{app-env-id}}
```

`frbit db push` asks to type the environment ID first. It dumps the current database on the environment to `/data/home/` before the import, and prints the command to restore it when the import fails.

## MySQL and MariaDB

DDEV runs MariaDB for Drupal by default, fortrabbit runs MySQL. A Drupal database dump moves between both in either direction. To match production, create the DDEV project with `--database=mysql:8.4`.

## Without the frbit CLI

The [MySQL export and import guides](/platform/mysql/export-import/intro) cover the same with `ssh`, `mysqldump` and a MySQL GUI.
