pg_restore returns error schema objects already exist

From: DavidF(at)nhb(dot)org
To: pgsql-novice(at)postgresql(dot)org
Subject: pg_restore returns error schema objects already exist
Date: 2005-04-07 16:23:21
Message-ID: F819F04434B0E845BF4EA9115F90EE4D654700@sunflower.nhb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi -

I'm working with postgres for the first time, and trying to do some trial
backups and restores. The pg_dump command is working fine, both through
pgadmin III and at the shell. For example, "pg_dump -F c -b -v -f
/pgbackups/mydb2dump.backup mydb2". According to the online manual, I need
to manually recreate the database prior to restoring it (or I can use the -C
option in pg_restore to do this). However, when I use pg_restore, it always
complains that objects in the schema already exist. "pg_restore -C -d
template1 /pgbackups/mydb2dump.backup" returns with "pg_restore:
[archiver(db)] could not execute query: ERROR: schema "information_schema"
already exists". This is, again, both at the shell and with pgadmin. Am I
missing some option, or misunderstanding the process? My goal is to be able
to restore the entire database, including the schema, so that I can rebuild
my ListManager server from scratch in a disaster recovery. Thanks a bunch in
advance!

David Fenske
Information Technology Administrator
National Honey Board
davidf(at)nhb(dot)org
(303)776-2337 x 27

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Deepblues 2005-04-07 16:26:59 Re: binding values to sql statement in DBI perl
Previous Message Sean Davis 2005-04-07 10:19:51 Re: JOIN on a lookup table