Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXqmH-0004t9-7o for pgsql-admin@arkaria.postgresql.org; Wed, 19 Jul 2017 15:20:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dXqmG-0000ja-Qe for pgsql-admin@arkaria.postgresql.org; Wed, 19 Jul 2017 15:20:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dXp1B-0005Mu-8K for pgsql-admin@postgresql.org; Wed, 19 Jul 2017 13:27:57 +0000 Received: from mail.eba.si ([93.103.19.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dXp17-00074l-Kk for pgsql-admin@postgresql.org; Wed, 19 Jul 2017 13:27:55 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.eba.si (Postfix) with ESMTP id 6D4B1178DB2E for ; Wed, 19 Jul 2017 15:27:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at mydomain = eba.si Received: from mail.eba.si ([127.0.0.1]) by localhost (mail.eba.si [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 35BqMuX4gGgW for ; Wed, 19 Jul 2017 15:27:48 +0200 (CEST) Received: from [192.168.0.109] (unknown [192.168.0.1]) by mail.eba.si (Postfix) with ESMTPSA id C5C2D178DB11 for ; Wed, 19 Jul 2017 15:27:48 +0200 (CEST) From: Rikardo Tinauer Content-Type: multipart/alternative; boundary="Apple-Mail=_729E2C94-001A-46E5-87F3-829F96317ACD" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Recovery of corrupted database Message-Id: <155A6581-E109-4FAC-B59B-ECDC09BD92AB@eba.si> Date: Wed, 19 Jul 2017 15:27:48 +0200 To: pgsql-admin@postgresql.org X-Mailer: Apple Mail (2.3273) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail=_729E2C94-001A-46E5-87F3-829F96317ACD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Our client got virus on database server encrypting the database. They = paid and got files decrypted but database wasn=E2=80=99t able to start. We got the following error: 2017-07-19 10:31:11 CEST LOG: database system was shut down in recovery = at 2017-07-19 10:29:00 CEST 2017-07-19 10:31:11 CEST LOG: invalid magic number B549 in log segment = 000000010000002E00000015, offset 0 2017-07-19 10:31:11 CEST LOG: invalid primary checkpoint record 2017-07-19 10:31:11 CEST LOG: invalid magic number B549 in log segment = 000000010000002E00000015, offset 0 2017-07-19 10:31:11 CEST LOG: invalid secondary checkpoint record 2017-07-19 10:31:11 CEST PANIC: could not locate a valid checkpoint = record 2017-07-19 10:31:11 CEST LOG: shutdown at recovery target 2017-07-19 10:31:11 CEST LOG: shutting down 2017-07-19 10:31:11 CEST LOG: database system is shut down We got past that with executing the =E2=80=9Cpg_resetxlog -f DATADIR=E2=80= =9D command. Now database starts but we cannot connect to it, we get the following = error:=20 2017-07-19 14:11:05 CEST ERROR: invalid page in block 0 of relation = global/12369 Can anyone help? Lp,=20 Rikardo Tinauer ---------------------------------------------------------- EBA, d.o.o., Ljubljana Litostrojska 40, SI-1000 Ljubljana Tel: +386 (0)590 98 890 Email: rikardo.tinauer@eba.si Web: http://www.ebadms.com ----------------------------------------------------------- --Apple-Mail=_729E2C94-001A-46E5-87F3-829F96317ACD Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Our client got virus on database server encrypting the = database. They paid and got files decrypted but database wasn=E2=80=99t = able to start.

We = got the following error:
2017-07-19 = 10:31:11 CEST LOG:  database system was shut down in recovery at = 2017-07-19 10:29:00 CEST
2017-07-19 10:31:11 CEST = LOG:  invalid magic number B549 in log segment = 000000010000002E00000015, offset 0
2017-07-19 = 10:31:11 CEST LOG:  invalid primary checkpoint record
2017-07-19 10:31:11 CEST LOG:  invalid magic number B549 = in log segment 000000010000002E00000015, offset 0
2017-07-19 10:31:11 CEST LOG:  invalid secondary = checkpoint record
2017-07-19 10:31:11 CEST PANIC: =  could not locate a valid checkpoint record
2017-07-19 10:31:11 CEST LOG:  shutdown at recovery = target
2017-07-19 10:31:11 CEST LOG:  shutting = down
2017-07-19 10:31:11 CEST LOG:  database = system is shut down


We got past that with = executing the =E2=80=9Cpg_resetxlog -f DATADIR=E2=80=9D = command.

Now = database starts but we cannot connect to it, we get the following = error: 
2017-07-19 14:11:05 CEST ERROR: =  invalid page in block 0 of relation global/12369

Can anyone = help?

Lp, 
Rikardo Tinauer
----------------------------------------------------------
EBA, d.o.o., Ljubljana
Litostrojska 40, SI-1000 = Ljubljana
Tel: +386 (0)590 98 890
Email: rikardo.tinauer@eba.si
Web: http://www.ebadms.com
-----------------------------------------------------------

= --Apple-Mail=_729E2C94-001A-46E5-87F3-829F96317ACD--