Re: best way to check pgdump

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: best way to check pgdump
Дата
Msg-id 201006230723.45709.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: best way to check pgdump  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
On Wednesday 23 June 2010 4:12:40 am Raymond O'Donnell wrote:
> On 23/06/2010 04:52, Janet Jacobsen wrote:
> > Hi.  What is the best way to check a pgdump
> > without doing a restore?
>
> If you used one of the binary formats for pg_dump, you can have
> pg_restore list the contents without actually restoring the database.

http://www.postgresql.org/docs/8.3/interactive/app-pgrestore.html

To add, pg_restore has an -f switch that allows you to restore a binary dump to
a file. To quote from above:

"pg_restore can operate in two modes. If a database name is specified, the
archive is restored directly into the database. Otherwise, a script containing
the SQL commands necessary to rebuild the database is created and written to a
file or standard output. The script output is equivalent to the plain text
output format of pg_dump. Some of the options controlling the output are
therefore analogous to pg_dump options. "


This is quite handy as allows you store dumps in the compressed binary format
and retrieve specific information as needed in a human readable form.

>
> If you did a text dump, just look into the file. :-)
>
> Ray.
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> rod@iol.ie



--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: missing uuid functions in postgresql-contrib RPM for linux?
Следующее
От: Ashesh Vashi
Дата:
Сообщение: Re: missing uuid functions in postgresql-contrib RPM for linux?