Re: Dump all the indexes/constraints/roles

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Dump all the indexes/constraints/roles
Дата
Msg-id 990d5f48-a4a4-3b52-41e0-03e3d4184e0e@hogranch.com
обсуждение исходный текст
Ответ на Dump all the indexes/constraints/roles  (Patrick B <patrickbakerbr@gmail.com>)
Список pgsql-general
On 10/17/2016 8:32 PM, Patrick B wrote:
> I need to export an entire database to another server, for testing
> purpose.
>
> Is there any way to export all indexes and constraints ?
> Postgres 9.2

on the existing machine, as the postgres user....

pg_dump -Fc -d databasename -f filename.pgdump

then, on the new machine,

createdb newdatabase -o dbownername
pg_restore -d newdatabase filename.pgdump



--
john r pierce, recycling bits in santa cruz



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

Предыдущее
От: Patrick B
Дата:
Сообщение: Dump all the indexes/constraints/roles
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Dump all the indexes/constraints/roles