Re: [GENERAL] Recovery damaged dump file

2017-03-13 Thread Michael Paquier
On Mon, Mar 13, 2017 at 7:40 PM, mac pack wrote: > Any one knows how pg_dump saves the dump in custom format. What is the > structure of the format, there is any doc about that? There are no docs, but the code in src/bin/pg_dump/pg_backup_custom.c can speak by itself if you

Re: [GENERAL] Recovery damaged dump file

2017-03-13 Thread mac pack
2017-03-10 14:58 GMT+00:00 Adrian Klaver : > On 03/10/2017 01:25 AM, mac pack wrote: > >> >> 2017-03-10 5:11 GMT+00:00 Adrian Klaver > >: >> >> >> On 03/09/2017 09:09 PM, Adrian Klaver wrote: >> >>

Re: [GENERAL] Recovery damaged dump file

2017-03-10 Thread mac pack
2017-03-10 5:11 GMT+00:00 Adrian Klaver : > 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

Re: [GENERAL] Recovery damaged dump file

2017-03-10 Thread Adrian Klaver
On 03/10/2017 01:25 AM, mac pack wrote: 2017-03-10 5:11 GMT+00:00 Adrian Klaver >: On 03/09/2017 09:09 PM, Adrian Klaver wrote: On 03/09/2017 03:55 AM, mac pack wrote: Hi. My PostgreSQL server

Re: [GENERAL] Recovery damaged dump file

2017-03-09 Thread Adrian Klaver
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

Re: [GENERAL] Recovery damaged dump file

2017-03-09 Thread Adrian Klaver
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

Re: [GENERAL] Recovery damaged dump file

2017-03-09 Thread Michael Paquier
On Thu, Mar 9, 2017 at 8:55 PM, mac pack 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

[GENERAL] Recovery damaged dump file

2017-03-09 Thread mac pack
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