Skip to content

cwp db snapshot

shipped 1.0.0
cwp db snapshot [name] [flags]

Local only — it acts on no environment.

ArgumentWhat it isDefault
[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.