recovery fail

Started by Łukasz Bieniekover 15 years ago4 messagesgeneral
Jump to latest
#1Łukasz Bieniek
lukebieniek@interia.pl

I'have made a backup my DB with pg_dump its (' pg_dump -U username dbname >backupfilename.sql.gz. When i want to restore it ( I drop the old database ,creaete new and language to it and i type a command 'cat backupfilename.sql.gz|gunzip|/usr/local/pgsql/bin/psql -U username dbname) this backup restore my all tables but its loses relations to some tables. and when it is restoring sysem send me messeges about missing relations . I think it is about order in this recovery data from backup. How to resolve this problem?

---------------------------------------------------------------------
Wez kredyt przez internet. Atrakcyjne oprocentowanie, bez zaswiadczen!
http://linkint.pl/f27d6

#2Denis BUCHER
dbucherml@hsolutions.ch
In reply to: Łukasz Bieniek (#1)
Re: recovery fail

Le 25.08.2010 15:15, Łukasz Bieniek a écrit :

I'have made a backup my DB with pg_dump its (' pg_dump -U username dbname>backupfilename.sql.gz. When i want to restore it ( I drop the old database ,creaete new and language to it and i type a command 'cat backupfilename.sql.gz|gunzip|/usr/local/pgsql/bin/psql -U username dbname) this backup restore my all tables but its loses relations to some tables. and when it is restoring sysem send me messeges about missing relations . I think it is about order in this recovery data from backup. How to resolve this problem?

Same version of postgresql (backup and restore) ?
If not, some small adaptations are always necessary...

What do you get as errors or warnings ?

Denis

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: Łukasz Bieniek (#1)
Re: recovery fail

2010/8/25 Łukasz Bieniek <lukebieniek@interia.pl>:

I'have made a backup my DB with pg_dump its (' pg_dump -U username dbname >backupfilename.sql.gz. When i want to restore it ( I drop the old database ,creaete new and language to it and i type a command 'cat backupfilename.sql.gz|gunzip|/usr/local/pgsql/bin/psql -U username dbname) this backup restore my all tables but its loses relations to some tables. and when it is restoring sysem send me messeges about missing relations . I think it is about order in this recovery data from backup. How to resolve this problem?

Are you piping the pg_dump through gzip? It doesn't look like it. If
you are, replace your restore command with:

zcat backupfile.sql.gz | psql ...

#4Selena Deckelmann
selenamarie@gmail.com
In reply to: Łukasz Bieniek (#1)
Re: recovery fail

Hi!

2010/8/25 Łukasz Bieniek <lukebieniek@interia.pl>:

I'have made a backup my DB with pg_dump its (' pg_dump -U username dbname >backupfilename.sql.gz. When i want to restore it ( I drop the old database ,creaete new and language to it and i type a command 'cat backupfilename.sql.gz|gunzip|/usr/local/pgsql/bin/psql -U username dbname) this backup restore my all tables but its loses relations to some tables. and when it is restoring sysem send me messeges about missing relations . I think it is about order in this recovery data from backup. How to resolve this problem?

Try running psql with '-v "ON_ERROR_STOP=true"' so that you get the
first error. You may be having a problem with a dependency early in
the restore process.

-selena

--
http://chesnok.com/daily - me