ddev_import_db
Import a SQL dump into your DDEV project database, supporting compressed and archive formats with options for extraction path and target database selection.
Instructions
Import a SQL dump file into the project. Supports .sql, .sql.gz, .sql.bz2, .sql.xz, .mysql, .zip, .tgz, .tar.gz. For archives, use extractPath for path inside archive. Target DB via targetDb (default "db"). Usage: ddev import-db [project] [flags] MCP args → ddev: src → --file, targetDb → --database, extractPath → --extract-path For full options and examples: ddev help import-db
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| src | No | Path to SQL dump file (ddev --file). Relative to project or absolute. | |
| targetDb | No | Target database name (ddev --database, default "db") | |
| extractPath | No | Path to extract within archive (ddev --extract-path) | |
| projectPath | No | Path to the DDEV project directory |