pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Uwe C. Schroeder <uwe@oss4u.com>
To: pgsql-admin@postgresql.org
Cc: Krzysztof Szadkowski <kszadkow@eldip.lodz.pl>
Cc: pgsql-admin-owner@postgresql.org
Subject: Re: Copy database
Date: Sun, 29 Jan 2006 19:31:29 -0800
Message-ID: <200601291931.29829.uwe@oss4u.com> (raw)
In-Reply-To: <000001c61ff9$f6eb2080$1401a8c0@eldipsrv>
References: <000001c61ff9$f6eb2080$1401a8c0@eldipsrv>

pg_dump -h sourcehost -U sourceuser sourcedatabase | psql -h desthost -U 
destuser destdatabase

you may have to add a parameter for the password depending on your pg_hba.conf 
settings. Both databases need to be network enabled and have a pg_hba.conf 
entry for the machine you're running this command on.
 


On Monday 23 January 2006 00:49, Krzysztof Szadkowski wrote:
> Hi all,
>
> I am looking for a way to copy whole database to another existing
> database.
> Any suggestions ?
>
> ---------------------------------------------
> Best regards,
>      Krzysztof Szadkowski
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

-- 
	UC

--
Open Source Solutions 4U, LLC	1618 Kelly St
Phone:  +1 707 568 3056		Santa Rosa, CA 95401
Cell:   +1 650 302 2405		United States
Fax:    +1 707 568 6416



view thread (4+ messages)  latest in thread

Message-ID: <200601291931.29829.uwe@oss4u.com>
Permalink:  ../200601291931.29829.uwe@oss4u.com/
Also on:    postgresql.org/message-id/200601291931.29829.uwe@oss4u.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: uwe@oss4u.com, kszadkow@eldip.lodz.pl, pgsql-admin-owner@postgresql.org
  Subject: Re: Copy database
  In-Reply-To: <200601291931.29829.uwe@oss4u.com>
  References: <000001c61ff9$f6eb2080$1401a8c0@eldipsrv> <200601291931.29829.uwe@oss4u.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox