Re: Copy database - Mailing list pgsql-admin

From Uwe C. Schroeder
Subject Re: Copy database
Date
Msg-id 200601291931.29829.uwe@oss4u.com
Whole thread Raw
In response to Copy database  ("Krzysztof Szadkowski" <kszadkow@eldip.lodz.pl>)
Responses Re: Copy database  (Christian Sengstock <csengstock@gmail.com>)
Re: Copy database  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: "Krzysztof Szadkowski"
Date:
Subject: Copy database
Next
From: Christian Sengstock
Date:
Subject: Re: Copy database