PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error

From: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error
Date: 2015-10-06 09:14:53
Message-ID: CAKKd065=rkJnfKJFLihYgucKvBvKM+1uZ8woSw2L0JzTP21mqg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar
header' error.

PostgreSQL Version - 9.4

Size of database (a0) - 5092MB

Database ‘a0’ has two tables films(8192 Bytes) and tb2(5085MB). And
contains no blob data.

*Dump Command *- pg_dump.exe -U postgres -Ft -b a0 > a0.dump

*Restore Command* - pg_restore.exe -Ft -C -U postgres -d postgres < a0.dump

------Error Output-----

2015-10-06 14:15:15 IST ERROR: missing data for column "name"

2015-10-06 14:15:15 IST CONTEXT: COPY tb2, line 1458917: "7"

2015-10-06 14:15:15 IST STATEMENT: COPY tb2 (id, name, modtime) FROM stdin;

pg_restore: [archiver (db)] Error while PROCESSING TOC:

pg_restore: [archiver (db)] Error from TOC entry 1996; 0 295155 TABLE DATA
tb2 postgres

pg_restore: [archiver (db)] COPY failed for table "tb2": ERROR: missing
data for column "name"

CONTEXT: COPY tb2, line 1458917: "7"

pg_restore: [tar archiver] corrupt tar header found in -09-18 (expected 5,
computed 30078) file position 91918336

----------------------

Please note that Dump and Restore of same database with COMPRESSED format
is not giving any errors. Only with TAR format this issue is seen.

Can you please suggest on how to understand/diagnose the cause for restore
failure ?

Thanks

Girish

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Samed YILDIRIM 2015-10-06 09:21:11 Re: postgresql services cant start
Previous Message SELCUK AYDIN 2015-10-06 08:44:07 postgresql services cant start