Re: Dump all databases to corresponding files

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dump all databases to corresponding files
Date: 2006-11-06 03:12:35
Message-ID: b42b73150611051912o7c9bcdb0g11ca6d207df723c1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/6/06, CSN <cool_screen_name90001(at)yahoo(dot)com> wrote:
> Anybody know of a script that dumps all databases into corresponding dump files, e.g.
>
> $ ./dump
> template0 -> template0.sql
> template1 -> template1.sql
> db1 -> db1.sql
> db2 -> db2.sql
> ...
>
> Also, would this approach add up to equal the output of pg_dumpall, or does pg_dumpall dump
> additional things (if so, please describe how they'd also be dumped)?

there are many ways to do this, but this would be a fun exercise for pl/sh.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-11-06 03:26:17 Re: Dump all databases to corresponding files
Previous Message CSN 2006-11-06 03:03:53 Dump all databases to corresponding files