Skip to content

drupal db export

Paulo Maia Carvalho edited this page May 20, 2026 · 1 revision

drupal-db-export

Export the Drupal database to a compressed SQL dump file.

Usage

/drupal-db-export
/drupal-db-export name=my-backup

What it does

  1. Resolves Drush (Docker container or local fallback).
  2. Runs drush sql:dump and saves the output to /workspace/.
  3. Compresses the file with gzip.
  4. Reports the file path and size.

Output

Files are saved to /workspace/ with a timestamp in the name:

/workspace/db-export-20240515-143022.sql.gz

Pass name=my-backup to use a custom filename prefix instead of db-export.

Notes

  • Requires the Docker stack to be running (database must be accessible).
  • The dump includes all tables and data. To exclude specific tables (e.g. cache tables), ask the agent to run a custom drush command.
  • Files in /workspace/ persist across container restarts and are visible in the file browser.

Related skills

Clone this wiki locally