PostgreSQL: manual dump before a risky migration

A minimal path for small databases when you need an obvious file before changing schema.

For small projects I prefer a named custom dump. It can be inspected with pg_restore -l without restoring it.

mkdir -p ~/db-dumps
pg_dump -Fc -f ~/db-dumps/app_$(date +%F_%H%M).dump appdb
pg_restore -l ~/db-dumps/app_*.dump | head
ls -lh ~/db-dumps

Verify the result

The file should not be empty, and pg_restore -l should print database objects.