Re: [GENERAL] Encoding problem using pg_dumpall - Mailing list pgsql-admin

From Cliff Pratt
Subject Re: [GENERAL] Encoding problem using pg_dumpall
Date
Msg-id 9adabaf40901311547r1444e0c4m4797da5b30671d63@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Encoding problem using pg_dumpall  (Michael Monnerie <michael.monnerie@is.it-management.at>)
Responses Re: [GENERAL] Encoding problem using pg_dumpall  ("Milen A. Radev" <milen@radev.net>)
List pgsql-admin
On Sat, Jan 31, 2009 at 12:23 AM, Michael Monnerie
<michael.monnerie@is.it-management.at> wrote:
> On Freitag 30 Januar 2009 Tom Lane wrote:
>> The -Fc (and -Ft) formats are only designed to hold the contents of a
>> single database; and pg_restore only knows how to restore into a
>> single database.
>>
>> If you feel like fixing that, step right up.
>
> Sorry, didn't want to step on toes here. I know that sometimes if you
> perfectly know a system you get blind over alternatives, and wanted to
> throw in an idea.
>
> The format of pg_dumpall could be a tar of single pg_dumps as well,
> making pg_dumpall just call pg_dump for each db, putting that output
> into the tar output from pg_dumpall. But again, just an idea, I don't
> mind really. I'm just a sysadmin who wants things as easy as possible.
> Maybe fixing pg_dumpall to include that -E is easier.
>
You should be able to knock up a simple script in bash, perl or python
to do what you want.

Sort of like:

Use 'psql' to get a list of the databases
Sanitize the list.
Loop through the list doing backup.
At the end zip them all.

With a little bit of trickery you should be able to zip them as you go.

With regards being too close to the system, while this is true, it
also possible to be distant from the system's entrails and not don't
realize the implications and difficulties of your brilliant idea for
enhancement!

Cheers,

Cliff

pgsql-admin by date:

Previous
From: "Marc Mamin"
Date:
Subject: autovacuum question
Next
From: "Milen A. Radev"
Date:
Subject: Re: [GENERAL] Encoding problem using pg_dumpall