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

Поиск
Список
Период
Сортировка
От Donald A Pellegrino
Тема Re: Bug #631: pg_dumpall does not accept -F or -f
Дата
Msg-id OF8BB544B2.5439CAB3-ON85256B98.0057449A@lvs.dupont.com
обсуждение исходный текст
Список 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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Loftis
Дата:
Сообщение: Re: Bug #630: date/time storage problem: timestamp parsed
Следующее
От: 呉 安棋
Дата:
Сообщение: Problem with database creation