Re: Dump & Load a database???

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Dump & Load a database???
Дата
Msg-id dcc563d10708210834t6ff8f651pc900814f3556e4e7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Dump & Load a database???  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-admin
On 8/21/07, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote:
> >>> On Tue, Aug 21, 2007 at  9:50 AM, in message <12256258.post@talk.nabble.com>,
> smiley2211 <smiley2211@yahoo.com> wrote:
>
> > Do I have to DROP \ recreate and load the target database (this is what I
> > currently do)?  is there a way to just do an IN PLACE load like in other
> > RDBMS environments???
> >
> > pg_dump proddb | gzip > proddb_082107.sql.gz
> >
> > gunzip < proddb_082107.sql.gz | psql -d testdb -f -
>
> You might want to consider using one or both of these pg_dump options:
>
>   -c, --clean                 clean (drop) schema prior to create
>   -C, --create                include commands to create database in dump

and note that you don't need a file in between steps.

pg_dump -c proddb | psql -d testdb

pg_dump --help and psql --help will give you a list of all the
switches you can throw at them.

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: How to export query results
Следующее
От: "Tena Sakai"
Дата:
Сообщение: Re: After adjusting checkpoint related entries in postgresql.conf...