-
Notifications
You must be signed in to change notification settings - Fork 0
drupal db import
Paulo Maia Carvalho edited this page May 20, 2026
·
1 revision
Import a SQL dump into the Drupal database. Supports both .sql and .sql.gz files.
/drupal-db-import db-export-20240515.sql.gz
/drupal-db-import file=db-export-20240515.sql
If you don't provide a filename, the skill lists available dump files in /workspace/ and asks you to choose.
- Locates the dump file (absolute path or relative to
/workspace/). - Detects whether the file is gzip-compressed.
- Drops the current database contents (asks for confirmation).
- Imports via
drush sql:clior pipes throughgunzipfor.gzfiles. - Runs
drush crafter import.
The skill always asks before dropping the existing database:
⚠ This will replace the current database. Continue? [y/N]
- Requires the Docker stack to be running.
- Large dumps (>500 MB) may take several minutes. The agent waits for completion.
- If the import fails midway, the database may be in a partial state. Re-run the import to restore.
- drupal-db-export — create a dump from the current database
- drupal-cr — rebuild caches after import (run automatically)
- drupal-init — import during initial project setup