Re: copy a postgres dbase to the same machine with different name?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonathan Roby" <robyj(at)cc(dot)umanitoba(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: copy a postgres dbase to the same machine with different name?
Date: 2006-01-10 18:19:29
Message-ID: 1889.1136917169@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jonathan Roby" <robyj(at)cc(dot)umanitoba(dot)ca> writes:
> For a project here at work I look after a web app that communicates with =
> a postgresql database. We need to clone/copy the existing database to =
> run app upgrades on the clone database and then use the upgraded =
> database in place of the original.

Are you talking about cloning the whole installation to run under a
separate postmaster? Or are you trying to create a new database with
a different name under the same postmaster?

If the latter, and you can idle the database while copying it, the
TEMPLATE option to CREATE DATABASE will serve.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark 2006-01-10 19:12:47 Re: q: explain analyze
Previous Message Jonathan Roby 2006-01-10 18:01:35 copy a postgres dbase to the same machine with different name?