Re: [GENERAL] Encoding problem using pg_dumpall

From: Cliff Pratt <enkiduonthenet(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: [GENERAL] Encoding problem using pg_dumpall
Date: 2009-01-31 23:47:53
Message-ID: 9adabaf40901311547r1444e0c4m4797da5b30671d63@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Sat, Jan 31, 2009 at 12:23 AM, Michael Monnerie
<michael(dot)monnerie(at)is(dot)it-management(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Milen A. Radev 2009-02-01 00:59:35 Re: [GENERAL] Encoding problem using pg_dumpall
Previous Message Marc Mamin 2009-01-30 16:31:09 autovacuum question

Browse pgsql-general by date

  From Date Subject
Next Message Octavio Alvarez 2009-01-31 23:54:10 Re: Pet Peeves?
Previous Message Gregory Stark 2009-01-31 23:36:13 Re: Pet Peeves?