Re: [GENERAL] Recovery damaged dump file - Mailing list pgsql-general

From Michael Paquier
Subject Re: [GENERAL] Recovery damaged dump file
Date
Msg-id CAB7nPqQ-ht14DbTFaSYWOzj0=xrs_rqo3sdkvN5L3tRm+qQ1Kw@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Recovery damaged dump file  (mac pack <mac.apxz@gmail.com>)
List pgsql-general
On Thu, Mar 9, 2017 at 8:55 PM, mac pack <mac.apxz@gmail.com> wrote:
> pg_restore  db.backup > out.sql
>
> pg_restore: [custom archiver] unrecognized data block type (0) while
> searching archive
>
> The follow commands works fine:
> pg_restore  -s db.backup > out.sql
> pg_restore -l db.backup

If you are lucky and as -l is able to print out the complete list of
objects and is able to dump all the schema, perhaps not everything is
lost. You may want to restore a limited set of objects by using
--use-list first, and see what can be saved.

> Do you think it's possible to recover the dump file, is there any method or
> tool to recover dump files?

Lost data would be lost. Likely you can still recover portions of it,
perhaps most of it.
--
Michael


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Unable to start postgresql
Next
From: Nathan Valentine
Date:
Subject: Re: [GENERAL] Removing and readding bdr nodes