Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

ddev-pantheon-db

A DDEV add-on that provides a fast Pantheon database pull from any environment using Terminus backups.

Installation

ddev add-on get augustash/ddev-pantheon-db

If using augustash/ddev-drupal or augustash/ddev-wordpress, this add-on is installed automatically on ddev start.

Requirements

Usage

ddev db        # Pull database if local db is empty or has only one table
ddev db -f     # Force a fresh database pull

For Drupal projects, ddev db will also run composer install, drush cr, drush cim, and drush updb after the pull.

Pulling from a different environment

The pull targets the environment set in DDEV_PANTHEON_ENVIRONMENT. To pull from a different environment for a single run, use the -e flag:

ddev db -f -e=dev
ddev db -f -e=test
ddev db -f -e=pr-123   # a multidev

No environment configured

There is no default environment — this is deliberate, so a misconfigured or brand-new site never silently pulls production. If DDEV_PANTHEON_ENVIRONMENT is unset (and no -e is given), ddev db skips the pull with a notice.

How it works

Creates a fresh database backup of the target environment with terminus backup:create and downloads it with terminus backup:get. This is the same fast, backup-based transfer for every environment (live, dev, test, or any multidev) — there is no separate live-only code path.

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.