[GENERAL] Recovery damaged dump file

Поиск
Список
Период
Сортировка
От mac pack
Тема [GENERAL] Recovery damaged dump file
Дата
Msg-id CAC9zK=S1wsdGcMN4Es8CvEwSHkx48prB5cZOf=MDN3zOSm_1HQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Recovery damaged dump file  (Michael Paquier <michael.paquier@gmail.com>)
Re: [GENERAL] Recovery damaged dump file  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
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.

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

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

Предыдущее
От: vinny
Дата:
Сообщение: Re: [GENERAL] count case when - PG 9.2
Следующее
От: Naveen Raj
Дата:
Сообщение: [GENERAL] Help regarding flushing data from Shared Memory to Database