Unix Technical Forum

pg_restore problem

This is a discussion on pg_restore problem within the pgsql Bugs forums, part of the PostgreSQL category; --> I have a problem restoring our large database. This has only stared happening since we moved to 8.1.x We ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:01 AM
Michael Andreasen
 
Posts: n/a
Default pg_restore problem

I have a problem restoring our large database. This has only stared
happening since we moved to 8.1.x

We are currently on 8.1.3.

We perform an over night dump of the database as follows;

pg_dump -Ft $db | bzip2 > $db.dump.tbz

This happens fine, without any errors.

On our backup machine also running 8.1.3 we do the following;

createdb $db
bzip2 -d -c $db.dump.tbz | pg_restore -i -O -d $db

However, after a while we get this error;

pg_restore: [tar archiver] could not find header for file 3765.dat in
tar archive

Our bzip2ed database is 1.2G so it's not small. We also run the same
procedure on a number of other smaller database and have no problems at
all. However, we are now in the unhandy position of having our main
operational database that we can backup, but not restore!

Help.





---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:01 AM
Tom Lane
 
Posts: n/a
Default Re: pg_restore problem

Michael Andreasen <michael@dunlops.com> writes:
> pg_dump -Ft $db | bzip2 > $db.dump.tbz
> ...
> pg_restore: [tar archiver] could not find header for file 3765.dat in
> tar archive


Does it work better if you use -Fc format? There was a similar report
recently, which makes me think the tar-format code has got some kind
of problem, but without a test case it's hard to look into it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 10:01 AM
Harco de Hilster
 
Posts: n/a
Default Re: pg_restore problem

I had similar problems with the tar format. 3 smaller databases worked,
the biggest did not. Switching to -Fc fixed it for me.

Sorry for not reporting this.

Harco

Tom Lane wrote:
> Michael Andreasen <michael@dunlops.com> writes:
>
>> pg_dump -Ft $db | bzip2 > $db.dump.tbz
>> ...
>> pg_restore: [tar archiver] could not find header for file 3765.dat in
>> tar archive
>>

>
> Does it work better if you use -Fc format? There was a similar report
> recently, which makes me think the tar-format code has got some kind
> of problem, but without a test case it's hard to look into it.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
>


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:58 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com