Skip to content

cwp db list

shipped 1.0.0
cwp db list [flags]

Local only: it acts on no environment.

FlagWhat it doesDefault
--with-agentwith —dry-run on a host with no shell: install and remove the PHP agent so the plan is realoff

Plus the shared flags --json, -v, --verbose, -q, --quiet and --dry-run.

What it does

cwp db list reads .ddev/db_snapshots/ and prints this project’s snapshots, newest first, with the time you took each one.

It is the command you run before cwp db restore when you know roughly when you want to go back to. pre-pull-<env>-<timestamp> entries are the ones cwp pull left behind.

Example

$ cwp db list
– snapshots — none in ~/Code/example/example.com/.ddev/db_snapshots

Captured from cwp 1.0.0. Not written by hand.

cwp db list --json   # for a script that wants the names

What it does not do

It changes nothing and reads no remote. It accepts --dry-run and ignores it: there is nothing to plan.

It does not prune. Snapshots accumulate until cwp db rm removes one.