From f90a84145a8a7b60d6b43eef58b7c2ca2ba5f53f Mon Sep 17 00:00:00 2001 From: George Hafiz Date: Tue, 18 Jan 2022 16:59:57 +0000 Subject: [PATCH] pg_dumpall: add page (#7646) --- pages/common/pg_dumpall.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/pg_dumpall.md diff --git a/pages/common/pg_dumpall.md b/pages/common/pg_dumpall.md new file mode 100644 index 0000000000..c8f4feedf9 --- /dev/null +++ b/pages/common/pg_dumpall.md @@ -0,0 +1,28 @@ +# pg_dumpall + +> Extract a PostgreSQL database cluster into a script file or other archive file. +> More information: . + +- Dump all databases: + +`pg_dumpall > {{path/to/file.sql}}` + +- Dump all databases using a specific username: + +`pg_dumpall --username={{username}} > {{path/to/file.sql}}` + +- Same as above, customize host and port: + +`pg_dumpall -h {{host}} -p {{port}} > {{output_file.sql}}` + +- Dump all databases into a custom-format archive file with moderate compression: + +`pg_dumpall -Fc > {{output_file.dump}}` + +- Dump only database data into an SQL-script file: + +`pg_dumpall --data-only > {{path/to/file.sql}}` + +- Dump only schema (data definitions) into an SQL-script file: + +`pg_dumpall -s > {{output_file.sql}}`