pg_dump -h localhost -U listmonk listmonk > listmonk-backup.sql

Category: Listmonk & Newsletters

pg_dump -h localhost -U listmonk listmonk > listmonk-backup.sql

Dump the listmonk database to a plain SQL file

Exports the whole schema and data as SQL statements that psql can replay, taking a consistent snapshot automatically. Plain format is easy to inspect and grep but larger and slower than custom format. Keep the dump off the same disk as the database when possible.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.