From: Scott Marlowe <scott.marlowe@gmail.com>
To: timalou2@netcourrier.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Restore a backup into a new schema
Date: Mon, 16 Jun 2008 20:34:39 -0600
Message-ID: <dcc563d10806161934l5a61ad40l761705fabb31ffe3@mail.gmail.com> (raw)
In-Reply-To: <mnet1.1213349588.23549.timalou2@netcourrier.com>
References: <mnet1.1213349588.23549.timalou2@netcourrier.com>
On Fri, Jun 13, 2008 at 3:33 AM, <timalou2@netcourrier.com> wrote:
> Hi,
>
> Is it possible to restore a backup schema to another schema ?
>
> For instance I create a backup of a database called "source" with its public schema with pg_backup
>
> I want to restore this backup in a database called "dest" into a new schema called public2
Easiest way is to edit the pg_dump file by hand or use sed / awk to
change it on the fly.
If there's a lot of data and that makes it tough to do that, look into
dumping the schema and data separately, but this doesn't always work
quite right for some complex schemas.
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott.marlowe@gmail.com, timalou2@netcourrier.com
Subject: Re: Restore a backup into a new schema
In-Reply-To: <dcc563d10806161934l5a61ad40l761705fabb31ffe3@mail.gmail.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