pg_dump -U myapp_user myapp_db > backup.sql
Category: Self-Hosting
pg_dump -U myapp_user myapp_db > backup.sql
Export a PostgreSQL database to a SQL file — the standard backup method
Exports a PostgreSQL database to a plain-text SQL file. Can be restored on any PostgreSQL instance and is human-readable.