Search Postgresql Archives

Re: Dump all the indexes/constraints/roles

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

 



On Mon, Oct 17, 2016 at 8:32 PM, Patrick B <patrickbakerbr@xxxxxxxxx> wrote:
Hi guys,

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
Patrick

By default pg_dump will export the constraints.  It will export the definition of the indexes, but not the physical contents of them, so they have to be recreated upon import.  That can be slow depending on the sizes and types involved.

Or you can clone the whole thing with pg_basebackup.  (If you have multiple databases on the same cluster, this will take all of them.  The only thing you can do about that is drop the ones you don't want.)

[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