Split pg_dump script

Поиск
Список
Период
Сортировка
От Markus Schaber
Тема Split pg_dump script
Дата
Msg-id 41E912A3.6070808@logi-track.com
обсуждение исходный текст
Список pgsql-sql
Hello,

The attached dump_split.sh script maybe helpful to some of you.

It is called with a database name and a base file name. It first dumps
out the schema and metadata of the database in a plain SQL file. After
this, it dumps out the data, each table into its own file, compressed
with bzip2.

This basically allows one to create an ascii dump of a large database
and still open and edit the schema with your favourite text editor
afterwards.

It also allows restoration of single tables (create the table by copying
the instructions from the schema file, and then restore the content by
piping the data file via bunzip2 into psql). I know that pg_dump -Ft and
-Fc also allow to do this, but bzip2 has a far better compression ratio
on most data.

Comments welcome (I'm subscribed to this list, so no need to Bcc:).

HTH,
Markus


Вложения

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: return value of the trigger function
Следующее
От: "j.random.programmer"
Дата:
Сообщение: SQL design question: null vs. boolean values