drupal db export - PauloCarv/drupalclaw-project GitHub Wiki
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
- Resolves Drush (Docker container or local fallback).
- Runs
drush sql:dumpand saves the output to/workspace/. - Compresses the file with gzip.
- 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
- drupal-db-import — import a dump back into the database
- drupal-db-query — run individual SQL queries