Re: have pg_restore create a new database?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas H(dot)" <me(at)alternize(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: have pg_restore create a new database?
Date: 2006-11-26 16:57:54
Message-ID: 19169.1164560274@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas H." <me(at)alternize(dot)com> writes:
> what is the proper method to restore data from a previous named database =
> "olddb" into a fresh database named "newdb"? the old database still =
> exists and i don't want to overwrite the data.

Create newdb by hand and then specify it as the connection target for
pg_restore. *Don't* use --create, as that tells pg_restore to create
and (re)connect to the database named in the dump.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas H. 2006-11-26 17:02:07 Re: have pg_restore create a new database?
Previous Message Thomas H. 2006-11-26 13:18:32 have pg_restore create a new database?