pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restore a backup into a new schema
2+ messages / 2 participants
[nested] [flat]

* Restore a backup into a new schema
@ 2008-06-13 09:33 timalou2@netcourrier.com
  2008-06-17 02:34 ` Re: Restore a backup into a new schema Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: timalou2@netcourrier.com @ 2008-06-13 09:33 UTC (permalink / raw)
  To: pgsql-admin

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 

Thanks a lot for your reply,

Thierry




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Restore a backup into a new schema
  2008-06-13 09:33 Restore a backup into a new schema timalou2@netcourrier.com
@ 2008-06-17 02:34 ` Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Scott Marlowe @ 2008-06-17 02:34 UTC (permalink / raw)
  To: timalou2@netcourrier.com; +Cc: pgsql-admin

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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-06-17 02:34 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-06-13 09:33 Restore a backup into a new schema timalou2@netcourrier.com
2008-06-17 02:34 ` Scott Marlowe <scott.marlowe@gmail.com>

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