Re: restore a dump db from tar file

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: restore a dump db from tar file
Дата
Msg-id 48EA3D67.9030502@iol.ie
обсуждение исходный текст
Ответ на Re: restore a dump db from tar file  ("Alain Roger" <raf.news@gmail.com>)
Ответы Re: restore a dump db from tar file  ("Alain Roger" <raf.news@gmail.com>)
Список pgsql-general
On 06/10/2008 16:12, Alain Roger wrote:

> AFAIK, pg_dump -v -o -U username -ci -Ft -f tarname.tar dbname
> backup the DB but without inserting code to create the BD itself... just

What's -ci? Looking at the docs, there's are -c and -i options, but I
don't see -ci.

> how can i do that automatically ?
> i mean when i dump my db, how can i dump ALSO the script to create the
> BD and its property ?

From the docs:

<quote>
-C
--create

    Begin the output with a command to create the database itself and
reconnect to the created database. (With a script of this form, it
doesn't matter which database you connect to before running the script.)

    This option is only meaningful for the plain-text format. For the
archive formats, you can specify the option when you call pg_restore.
</quote>

So it seems that you can't do it when using a non-text format - you'll
have to do a plain-text dump, and maybe pipe it to tar if you want that.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: restore a dump db from tar file
Следующее
От: "Alain Roger"
Дата:
Сообщение: Re: restore a dump db from tar file