<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pg_dumpall on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/pg_dumpall/</link><description>Recent content in Pg_dumpall on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Tue, 09 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/pg_dumpall/index.xml" rel="self" type="application/rss+xml"/><item><title>Back Up All PostgreSQL Databases with pg_dumpall</title><link>https://www.postgresscripts.com/post/backup-all-postgresql-databases-with-pg-dumpall/</link><pubDate>Tue, 09 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/backup-all-postgresql-databases-with-pg-dumpall/</guid><description>
&lt;h2 id="back-up-all-postgresql-databases-with-pg_dumpall"&gt;Back Up All PostgreSQL Databases with pg_dumpall&lt;/h2&gt;
&lt;p&gt;Before a major-version upgrade or a disaster-recovery rehearsal, a DBA needs a single artifact that captures the whole cluster: every database, plus the global objects that live outside any one database. &lt;code&gt;pg_dumpall&lt;/code&gt; produces exactly that — one plain-SQL script that recreates all databases together with the roles, tablespaces, and grants that &lt;code&gt;pg_dump&lt;/code&gt; on its own leaves behind.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="7945792173"
data-ad-format="auto"
data-full-width-responsive="true"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;pg_dump&lt;/code&gt; backs up a single database. It does a thorough job inside that database, but it does not capture cluster-wide objects. Roles (users and groups), role memberships, tablespace definitions, and the privileges attached to them are stored once per cluster, not once per database. Restore a &lt;code&gt;pg_dump&lt;/code&gt; file into a fresh server and the owners and grant statements refer to roles that do not exist yet.&lt;/p&gt;</description></item></channel></rss>