View Single Post

   
  #2 (permalink)  
Old 04-12-2008, 07:43 AM
Tom Lane
 
Posts: n/a
Default Re: pg_restore exclude schema from being droped option

Kostis Mentzelos <mentzelos@gmx.net> writes:
> Now, to backup the database I choose to create 2 scripts, BackupData.sh
> to backup all small tables and BackupHist.sh to backup history tables.
> When I call pg_restore -c to restore data tables, pg_restore report a
> failure because it is trying to drop a schema that it is not empty.


Why (or how) is the schema part of the backup at all? If you used
pg_dump's -t switch to select the tables to back up, there should not be
a schema entry in the dump. So there's something you're not telling us
about how you are using the tools.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Reply With Quote