cwp db import
shipped 1.0.0cwp db import <file> [flags]
Local only — it acts on no environment.
| Argument | What it is | Default |
|---|---|---|
<file> | SQL dump to import |
| Flag | What it does | Default |
|---|---|---|
--yes | skip the confirmation prompt | off |
Plus the shared flags --json, --verbose and --dry-run.
What it does
Runs ddev import-db, replacing the local database with a SQL dump.
It confirms first, because the local database is replaced; --yes skips the
prompt. With --json or no terminal it refuses with exit 6 rather than guessing.
A dump that arrived any way other than cwp pull has not been
scrubbed and carries no mail guard. Run cwp scrub after importing
one.
Example
cwp db import handover.sql.gz
cwp db import dump.sql --yes
What it does not do
It does not scrub, install the mail guard, run search-replace, or snapshot what
it is replacing. Those belong to cwp pull, which is the command
that knows where the data came from; this one takes a file and does what it is
told.
Uploads are not included.