Re: pg_restore problem - Mailing list pgsql-admin

From lists
Subject Re: pg_restore problem
Date
Msg-id 014401c2f790$7c244be0$fafaabc8@insyde
Whole thread Raw
In response to pg_restore problem  ("lists" <lists@insyde.com.br>)
List 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.


pgsql-admin by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: pgAdmin II questions
Next
From: Kevin Brown
Date:
Subject: Re: [pgsql-advocacy] uppercase = lowercase