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

From: Payal Singh <payal(at)omniti(dot)com>
To: girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error
Date: 2015-10-06 23:14:51
Message-ID: CANUg7LA=DB4Dvk-EBuwLD4Q9V2ArRiBsbPttz_tDnZqYO2LAVQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Which tar implementation are you using?

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Tue, Oct 6, 2015 at 5:14 AM, girish R G peetle <giri(dot)anamika0(at)gmail(dot)com>
wrote:

> 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
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Payal Singh 2015-10-06 23:19:48 Re: Upgrade master / slave
Previous Message Jan 2015-10-06 22:59:02 Re: Long-running and non-finishing VACUUM ANALYZE on large table