cwp db export
shipped 1.0.0cwp db export [file] [flags]
Local only: it acts on no environment.
| Argument | What it is | Default |
|---|---|---|
[file] | target file (default: |
| Flag | What it does | Default |
|---|---|---|
--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 export runs ddev export-db and writes the local database to a file.
With no filename the default is <project>-<timestamp>.sql.gz in the current
directory.
Example
cwp db export
cwp db export handover.sql.gz
What it does not do
It exports the local database, not a remote one, and not the uploads.
An exported dump is an unscrubbed copy of whatever is local. If it came down
from production and you skipped the scrub, personal data is in that file. cwp
says so after every export. The scaffolded .gitignore keeps *.sql and
*.sql.gz out of the repository. The file is still on your disk and still
yours to handle.