Re: pg_restore problem

From: "lists" <lists(at)insyde(dot)com(dot)br>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_restore problem
Date: 2003-03-31 14:19:02
Message-ID: 014401c2f790$7c244be0$fafaabc8@insyde
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> Are you sure your restoring to an empty database? If you try to restore
> your dump into the database you dumped it from (without first
> drop/create) it will take forever as you'll have all kinds of data
> collisions (imagine every insert into a table erroring out due to
> duplicate primary key).

Yes, I'm sure it is an empty database. I didn't mention in the e-mail,
but the complete script I did is:

$pg_dump -s DB1 > DB1.sql

$pg_dump -a -b -Fc -f DB1.dump -o -v DB1

$dropdb DB2

$createdb DB2

$psql DB2 <DB1.sql

$pg_restore -a -d DB2 -Fc -o -v DB1.dump

So it's a brand new DB I'm restoring to.

> As for the -Ft vs. -Fc size question, the tar format is not a compressed
> format, while the "c"ustom format is.
Thanks.

Ricardo.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew Biagioni 2003-03-31 14:56:31 Re: pgAdmin II questions
Previous Message Robert Treat 2003-03-31 14:01:50 Re: Realistic upper bounds on table size