Re: Possible to dump/load a database from within psql?

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Brian Cardarella <brian(at)dockyard(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Possible to dump/load a database from within psql?
Date: 2016-01-25 10:57:38
Message-ID: 56A5FFA2.9000303@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/25/2016 02:16 AM, Brian Cardarella wrote:
> Is it possible, and if so how, to dump and then load a database to/from
> a file from within a psql connection?

pg_dump -h $host -U $user $database|psql -U $user -h $host $database

http://www.postgresql.org/docs/9.5/static/app-pgdump.html

Sincerely,

JD

--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vitaly Burovoy 2016-01-25 13:24:45 Re: ERROR: check constraint - PostgreSQL 9.2
Previous Message Simon Riggs 2016-01-25 10:56:41 Re: TABLESAMPLE usage