-
-a
--data-only
-
Dump only the data, not the schema (data definitions).
-
-c
--clean
-
Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well.
-
-d
--inserts
-
Dump data as INSERT commands (rather than COPY). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non-PostgreSQL databases. Note that the restore may fail altogether if you have rearranged column order. The -D option is safer, though even slower.
-
-D
--column-inserts
--attribute-inserts
-
Dump data as INSERT commands with explicit column names (INSERT INTO
table
(
column
, ...) VALUES ...). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non-PostgreSQL databases.
-
-g
--globals-only
-
Dump only global objects (users and groups), no databases.
-
-i
--ignore-version
-
Ignore version mismatch between pg_dumpall and the database server.
pg_dumpall can handle databases from previous releases of PostgreSQL, but very old versions are not supported anymore (currently prior to 7.0). Use this option if you need to override the version check (and if pg_dumpall then fails, don't say you weren't warned).
-
-o
--oids
-
Dump object identifiers (OIDs) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.
-
-O
--no-owner
-
Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O.
-
-s
--schema-only
-
Dump only the object definitions (schema), not data.
-
-S
username
--superuser=
username
-
Specify the superuser user name to use when disabling triggers. This is only relevant if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)
-
-v
--verbose
-
Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump.
-
-x
--no-privileges
--no-acl
-
Prevent dumping of access privileges (grant/revoke commands).
-
-X disable-dollar-quoting
--disable-dollar-quoting
-
This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.
-
-X disable-triggers
--disable-triggers
-
This option is only relevant when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload.
Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S, or preferably be careful to start the resulting script as a superuser.
-
-X use-set-session-authorization
--use-set-session-authorization
-
Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, may not restore properly.