pg_dumpall
Extract a PostgreSQL database cluster into a script file or other archive file. tldr-pages
On several platforms
Several platforms
Dump all databases
pg_dumpall >path/to/file.sqlIdentifyDump all databases using a specific username
pg_dumpall --username username >path/to/file.sqlIdentifyDump all databases using a specific host and port
pg_dumpall --host host --port port >output_file.sqlIdentifyDump only database data into an SQL-script file
pg_dumpall --data-only >path/to/file.sqlIdentifyDump only schema (data definitions) into an SQL-script file
pg_dumpall --schema-only >output_file.sqlIdentify