Re: Using pg_dump and pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark <mark(at)lumison(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using pg_dump and pg_restore
Date: 2006-04-18 15:54:54
Message-ID: 13864.1145375694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark <mark(at)lumison(dot)net> writes:
> So far we have tried normal switches on the end of pg_dump, including
> -Fc, -c, C, with corresponding switches on the pg_restore command. When
> the restore actually executes, it does not fully drop the DB prior to
> restoration so any test tables added to the DB after a dump are still
> there after a restore.

I think you want to drop the database explicitly. Something like

pg_dump -Fc mydb >mydb.dump
...
dropdb mydb
pg_restore -C -d template1 mydb.dump

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brendan Duddridge 2006-04-18 17:32:39 Weird error updating table
Previous Message Mark 2006-04-18 15:18:49 Using pg_dump and pg_restore