pg_dumpall

A core utility for exporting all cluster databases

pg_dumpall is a core utility for exporting all databases in a cluster, and/or global objects.

pg_dumpall was added in PostgreSQL 6.0.

Change history

Work-in-progress

Examples

Dump the global objects of a freshly initialized database cluster:

$ pg_dumpall --globals-only
--
-- PostgreSQL database cluster dump
--

SET default_transaction_read_only = off;

SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;

--
-- Roles
--

CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS;

--
-- PostgreSQL database cluster dump complete
--
 

Categories

Backup, Data import/export

See also

pg_dump, pg_restore