Re: [GENERAL] Recovery damaged dump file

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: [GENERAL] Recovery damaged dump file
Дата
Msg-id bd1cea11-3cdb-156a-18a8-9ac4fc1734c8@aklaver.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Recovery damaged dump file  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: [GENERAL] Recovery damaged dump file  (mac pack <mac.apxz@gmail.com>)
Список pgsql-general
On 03/09/2017 09:09 PM, Adrian Klaver wrote:
> On 03/09/2017 03:55 AM, mac pack wrote:
>> Hi.
>>
>> My PostgreSQL server was affect by a Ransomware virus. I'm trying to
>> restore the database from a dump file made by pg_dump in custom format
>> (-F c option), but the dump file seems to be damaged in the first's 1000
>> lines.
>>
>> Opening the file with vi shows ^@^@^@^@^@^@^@^@^@^@^ followed by part of
>> the databse schema and the a lote of lines with binary characters that i
>> think is the table's data.
>
> The custom format is a binary format so non text characters would be
> expected.
>
> Did you try to restore using the file, before doing the below?
>
> If there was an error when you did that and if so what was it?

Should be:

Was there an error when you did that and if so what was it?

>
>>
>> I tried to replace those first lines with lines from other dev database
>> and i can run pg_restore but at some point throws error.
>>
>> 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
>>
>> Do you think it's possible to recover the dump file, is there any method
>> or tool to recover dump files?
>>
>>
>> Thanks.
>> Mário
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Recovery damaged dump file
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [GENERAL] Running TAP regression tests under windows/msvc