Search Postgresql Archives

Re: Dump all the indexes/constraints/roles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux