pg_basebackup

Physical PostgreSQL backup

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Takes a base backup of a running cluster.

Common flags
FlagMeaning
-DTarget directory
-FpPlain format
-X stream-X stream⚠ Include WAL
Examples
pg_basebackup -h primary -D /backup -X stream -PBase backup · explain & risk-check →
Related
pg_dump
Open the full explainer →More in Databases

Reference text is hand-written and may be incomplete — check man pg_basebackup for your version. Test destructive commands on a non-production system first.