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 |
--with-agent | with —dry-run on a host with no shell: install and remove the PHP agent so the plan is real | off |
Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.
What it does
cwp db import runs ddev import-db and replaces the local database with a
SQL dump.
It asks you to confirm first, because it replaces the local database. --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 carries no
scrub and 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, the command that
knows where the data came from. This one takes a file and does what it is told.
Uploads are not included.