Re: Bug #631: pg_dumpall does not accept -F or -f

From: "Donald A Pellegrino" <Donald(dot)A(dot)Pellegrino(at)USA(dot)dupont(dot)com>
To: "Bruce Momjian <pgman" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #631: pg_dumpall does not accept -F or -f
Date: 2002-04-11 16:23:18
Message-ID: OF8BB544B2.5439CAB3-ON85256B98.0057449A@lvs.dupont.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Thanks for the quick response. I see that pg_dumpall outputs the global
objects (-g) to stdout and that it cannot be combined with the -F or -f for
this reason. I would still like to be able to do a full database backup,
including all databases with oids and blobs, from a generic shell script
that did not know about which databases existed. Under the current set of
utilities this does not seem to be possible without coding the script to
run:

pg_dump --oids --blobs --format=c

for each database and sending each database to it's own backup file. By
modifying the logic of the pg_dumpall script a solution might be possible.
I propose the following backup logic:

1. Backup all the globals to a text file.

pg_dumpall --globals-only > globals.dump

2. Backup all the schemas to a text file, don't output globals.

pg_dumpall --schema-only > schema.dump

3. Backup all the databases to a custom file, don't output globals.

pg_dumpall --data-only --format=c --oids --blobs > data.dump

This presumes however that the custom file formats output by each pg_dump
for a database can be concatenated into a single file. Is this possible?

If so, pg_dumpall would only need to detect --globals-only. If it is used
then output global information to stdio. If it is not present then call
pg_dump for each database with the full set of parameters given and don't
output anything from pg_dumpall.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-04-11 16:41:48 Re: Bug #631: pg_dumpall does not accept -F or -f
Previous Message Andreas Schwab 2002-04-11 16:19:24 Re: Bug #630: date/time storage problem: timestamp parsed