Re: how to replicate database - Mailing list pgsql-general

From Oliver Elphick
Subject Re: how to replicate database
Date
Msg-id 1063270934.5248.175.camel@linda.lfix.co.uk
Whole thread Raw
In response to how to replicate database  (Caroline Yong <tarabas1978@yahoo.com>)
Responses Re: how to replicate database
List pgsql-general
On Thu, 2003-09-11 at 09:15, Caroline Yong wrote:
> Is there a way to replicate one-off(a copy of
> duplicate) of an existing Postgres database.

pg_dump mydatabase > some_file

move some_file to another machine (or to duplicate the database on the
same server, use a new database name below)

createdb mydatabase
psql -d mydatabase < some_file

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "I am crucified with Christ; nevertheless I live; yet
      not I, but Christ liveth in me; and the life which I
      now live in the flesh I live by the faith of the Son
      of God, who loved me, and gave himself for me."
                                         Galatians 2:20


pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: MD5 function is not available ?
Next
From: Caroline Yong
Date:
Subject: Re: how to replicate database