cwp db snapshot
shipped 1.0.0cwp db snapshot [name] [flags]
Local only — it acts on no environment.
| Argument | What it is | Default |
|---|---|---|
[name] | snapshot name (default: a timestamp) |
Plus the shared flags --json, --verbose and --dry-run.
What it does
Runs ddev snapshot --name <name> against the local database. With no name, the
name is a timestamp — 20260728-113000.
cwp pull takes one of these before every import, named
pre-pull-<env>-<timestamp>, so the ordinary reason to run this by hand is
before an experiment you might want to walk back.
Example
cwp db snapshot before-migration
cwp db snapshot # timestamped
What it does not do
Uploads are not included. A snapshot is the database, so restoring one brings back your layouts, your options and your posts — not your media library.
Snapshots accumulate. Nothing is pruned for you; cwp db list and
cwp db rm are the answer.