Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A65079F9B96 for ; Mon, 22 Oct 2007 04:23:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00188-05 for ; Mon, 22 Oct 2007 04:23:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from weatherbeeta.com.au (mail.weatherbeeta.com.au [202.154.127.242]) by postgresql.org (Postfix) with ESMTP id 1BC3C9F9B19 for ; Mon, 22 Oct 2007 04:23:37 -0300 (ADT) Received: (qmail 30513 invoked from network); 22 Oct 2007 07:23:27 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;18054dc89542413a357203ca521561c2; Received: from unknown (HELO mail.weatherbeeta.com.au) (10.20.0.2) by 10.20.0.254 with SMTP; 22 Oct 2007 07:23:26 -0000 Received: (qmail 18363 invoked by uid 1166); 22 Oct 2007 17:23:09 +1000 Received: from 172.20.0.155 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.0.155):. Processed in 3.763511 secs); 22 Oct 2007 07:23:09 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.0.155):. Processed in 3.763511 secs Process 18342) Received: from it-phil.weatherbeeta.com.au (HELO wbaus090) (172.20.0.155) by mail.weatherbeeta.com.au with SMTP; 22 Oct 2007 17:23:04 +1000 From: "Phillip Smith" To: "'Anibal David Acosta'" Cc: Subject: Re: Please help (backup) Date: Mon, 22 Oct 2007 17:22:42 +1000 Organization: Weatherbeeta Pty Ptd Message-ID: <024701c8147c$55cc9430$9b0014ac@wbaus090> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0248_01C814D0.2778A430" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Importance: Normal In-Reply-To: <471C3602.2090802@personal.net.py> X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1193037806.821-30503-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.05/0.08 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.933 tagged_above=0 required=5 tests=AWL=-0.465, BAYES_50=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=1.396 X-Spam-Level: X-Archive-Number: 200710/204 X-Sequence-Number: 27118 This is a multi-part message in MIME format. ------=_NextPart_000_0248_01C814D0.2778A430 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable (Please reply to the list so everyone can keep track of the thread) =20 You=E2=80=99ll need to look at the table definitions to work out what = the data should look like, and if it doesn=E2=80=99t look like that = =E2=80=93 then it=E2=80=99s probably part of the corrupt data=E2=80=A6 =20 =20 -----Original Message----- From: Anibal David Acosta [mailto:aa@personal.net.py]=20 Sent: Monday, 22 October 2007 15:33 To: Phillip Smith Subject: Re: [ADMIN] Please help (backup) =20 I open with word pad & notepad, but table, functions and other object = declarations looks like "plain text" but the DATA nope. This is the beginnig of something that looks as DB object --------------------------------------------------------------------- ALTER TABLE ONLY threads ADD CONSTRAINT threads_fk1 FOREIGN KEY (forum_id) REFERENCES = forums(id) ON DELETE RESTRICT; =3D ALTER TABLE ONLY public.threads DROP CONSTRAINT threads_fk1; public postgres false=20 _____ =20 1488=20 _____ =20 1869=20 _____ =20 1464 =20 --------------------------------------------------------------------- This is the beginnig of something that looks as DB object --------------------------------------------------------------------- x=C5=93eY=C3=9Dz=C3=9A=C2=B8=C2=BD=C3=9E} =C3=8F=C3=8D=C2=B9=CB=9C=C3=AFk=C2=B61=E2=80=A0=C2=BB!=C2=90=C2=A4=C2=A4$= =C3=A1 M=C3=9B3g=C3=8A'=C5=92 =C3=99bd;=3D=C3=8974W=C3=A7]=C3=A6Q=C3=A6 =C3=8E=E2=80=99Im=C2=B7?!^=E2=80=93-ikk=C2=AD=C2=B5E=E2=80=94=E2=80=A0C=C3= =A6jgJ=C5=A1=C2=BD=E2=80=B0=C3=9C=C3=95=E2=80=A6=C3=88=E2=80=A2V=C3=82=C3= =92=C3=85=E2=80=BA=C3=90]_=C3=8ABZ --------------------------------------------------------------------- BTW, I used the "PGAdmin" application to make the backup, I don't have = any BLOB column, just normal data type (integer, varchar, datetime) As you can see, the "data" section is not human readable, so I cant = modify it. Thanks for your time Phillip, I hope to find a solution. regards. Anibal Phillip Smith escribi=C3=B3:=20 The dumped file is just a plain-text file (Depending on the data types within your database) =20 You should be able to open the backup you made with pg_dump in your favourite editor such as vi and search through for the dodgy data. Clear = out the bad stuff, write it back to disk and you should be good to go. =20 Obviously this won't "save" the damaged portion of the data, and it may = have unpredictable effects when you take in to account any foreign keys etc = you may have in the database that depends on this data. =20 Cheers, ~p =20 =20 -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin- owner@postgresql.org] On Behalf Of Anibal David Acosta Sent: Monday, 22 October 2007 11:16 To: pgsql-admin@postgresql.org Subject: [ADMIN] Please help (backup) =20 I have a backup done with "pg_dump" utility. =20 For some reason the backup file has 8 phisical bad sectors (17 KB of = data) =20 Now when I try to restore the backup all tables are created successfully and data of almost all tables restores successfully too, but one table (the most important) appear empty. =20 When I do a pg_restore its show all sql instructions and data until arrive to the "damaged sector" and throws a "out of memory" exception. =20 I want to know if is possible to fix the backup file removing the blocks in the "bad sectors" in order to restore all other information. =20 something like file dump surgery :) =20 Thanks! =20 Anibal =20 =20 ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? =20 http://archives.postgresql.org =20 =20 =20 THINK BEFORE YOU PRINT - Save paper if you don't really need to print = this =20 *******************Confidentiality and Privilege = Notice******************* =20 The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message = or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. =20 Information in this message that does not relate to the official = business of Weatherbeeta must be treated as neither given nor endorsed by = Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be = liable for direct, indirect or consequential loss arising from transmission of = this message or any attachments e-mail. =20 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly =20 =20 =20 =0ATHINK BEFORE YOU PRINT - Save paper if you don't really need to print this= =0A=0A*******************Confidentiality and Privilege Notice*******************= =0A=0AThe material contained in this message is privileged and confidential to= =0Athe addressee. If you are not the addressee indicated in this message or= =0Aresponsible for delivery of the message to such person, you may not copy=0Aor= deliver this message to anyone, and you should destroy it and kindly=0Anotify= the sender by reply email.=0A=0AInformation in this message that does not relat= e to the official business=0Aof Weatherbeeta must be treated as neither given = nor endorsed by Weatherbeeta.=0AWeatherbeeta, its employees, contractors or as= sociates shall not be liable=0Afor direct, indirect or consequential loss aris= ing from transmission of this=0Amessage or any attachments=0Ae-mail.=0A ------=_NextPart_000_0248_01C814D0.2778A430 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

(Please reply to the list so = everyone can keep track of the thread)

 

You=E2=80=99ll need to look at the = table definitions to work out what the data should look like, and if it = doesn=E2=80=99t look like that =E2=80=93 then it=E2=80=99s probably part of the corrupt = data=E2=80=A6

 

 

-----Origi= nal Message-----
From: Anibal David Acosta [mailto:aa@personal.net.py]
Sent: Monday, 22 October = 2007 15:33
To: Phillip Smith
Subject: Re: [ADMIN] = Please help (backup)

 

I open with word pad = & notepad, but table, functions and other object declarations looks like "plain text" but the DATA nope.

This is the beginnig of something that looks as DB object
---------------------------------------------------------------------
= ALTER TABLE ONLY threads
    ADD CONSTRAINT threads_fk1 FOREIGN KEY (forum_id) = REFERENCES forums(id) ON DELETE RESTRICT;
 =3D   ALTER TABLE ONLY public.threads DROP CONSTRAINT threads_fk1;
       public       = postgres    false=20


   1488=20
   1869=20
   1464     
---------------------------------------------------------------------



This is the beginnig of something that looks as DB object
---------------------------------------------------------------------

 x=C5=93eY=C3=9Dz=C3=9A= =C2=B8=C2=BD=C3=9E}
=C3=8F=C3=8D=C2=B9=CB=9C=C3=AFk=C2=B61=E2=80=A0=C2=BB!
=C2=90=C2=A4=C2=A4$=C3=A1 M=C3=9B3g=C3=8A'=C5=92 =C3=99bd;=3D=C3=8974W=C3=A7]=C3=A6Q=C3=A6
=C3=8E=E2=80=99Im=C2=B7?!^=E2=80=93-ikk=C2=AD=C2=B5E=E2=80=94=E2=80=A0C=C3= =A6jgJ=C5=A1=C2=BD=E2=80=B0=C3=9C=C3=95=E2=80=A6=C3=88=E2=80=A2V=C3=82=C3= =92=C3=85=E2=80=BA=C3=90]_=C3=8ABZ
---------------------------------------------------------------------


BTW, I used the "PGAdmin" application to make the backup, I = don't have any BLOB column, just normal data type (integer, varchar, = datetime)


As you can see, the "data" section is not human readable, so I cant  modify it.


Thanks for your time Phillip, I hope  to find a solution.

regards.

Anibal

Phillip Smith escribi=C3=B3:

The dumped file is just a plain-text file =
(Depending on the data types
within your =
database)
 
You should be able to open the backup you =
made with pg_dump in your
favourite editor such as vi and search =
through for the dodgy data. Clear out
the bad stuff, write it back to disk and you =
should be good to go.
 
Obviously this won't "save" the =
damaged portion of the data, and it may =
have
unpredictable effects when you take in to =
account any foreign keys etc you
may have in the database that depends on this =
data.
 
Cheers,
~p
 
=C2=A0 
-----Original =
Message-----
From: pgsql-admin-owner@postgr=
esql.org [mailto:pgsql-admin-
owner@postgresql.org] On Behalf = Of Anibal David Acosta
Sent: Monday, 22 October 2007 =
11:16
To: pgsql-admin@postgresql.org=
Subject: [ADMIN] Please help =
(backup)
 
I have a backup done with "pg_dump" =
utility.
 
For some reason the backup file has 8 =
phisical bad sectors (17 KB of data)
 
Now when I try to restore the backup all =
tables are created successfully
and data of almost all tables restores =
successfully too, but one table
(the most important) appear =
empty.
 
When I do a pg_restore <backup_file> =
its show all sql instructions and
data until arrive to the "damaged =
sector" and throws a "out of =
memory"
exception.
 
I want to know if is possible to fix the =
backup file removing the blocks
in the "bad sectors" in order to =
restore all other information.
 
something like file dump surgery =
:)
 
Thanks!
 
Anibal
 
 
---------------------------(end of =
broadcast)---------------------------
TIP 4: Have you searched our list =
archives?
 
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 http://archives.postgresql.org
=C2=A0=C2=A0=C2=A0 =
 
 
THINK BEFORE YOU PRINT - Save paper if you =
don't really need to print this
 
*******************Confidentiality and =
Privilege Notice*******************
 
The material contained in this message is =
privileged and confidential to
the addressee.=C2=A0 If you are not the =
addressee indicated in this message or
responsible for delivery of the message to =
such person, you may not copy
or deliver this message to anyone, and you =
should destroy it and kindly
notify the sender by reply =
email.
 
Information in this message that does not =
relate to the official business
of Weatherbeeta must be treated as neither =
given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or =
associates shall not be liable
for direct, indirect or consequential loss =
arising from transmission of this
message or any =
attachments
e-mail.
 
---------------------------(end of =
broadcast)---------------------------
TIP 1: if posting/reading through Usenet, =
please send an appropriate
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
subscribe-nomail command to majordomo@postgresql.org so =
that your
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 message =
can get through to the mailing list =
cleanly
 
 
=C2=A0 

=

=0ATHINK BEFORE YOU PRINT - Save paper if you don't really need to print t= his e-mail.=0A

=0A*******************Confidentiality and Privilege Notice**= *****************=0A

=0AThe material contained in this message is privileg= ed and confidential to=0Athe addressee. If you are not the addressee indicate= d in this message or=0Aresponsible for delivery of the message to such person,= you may not copy=0Aor deliver this message to anyone, and you should destroy = it and kindly=0Anotify the sender by reply email.=0A

=0AInformation in this mess= age that does not relate to the official business=0Aof Weatherbeeta must be tr= eated as neither given nor endorsed by Weatherbeeta.=0AWeatherbeeta, its emplo= yees, contractors or associates shall not be liable=0Afor direct, indirect or = consequential loss arising from transmission of this=0Amessage or any attachme= nts=0A
= ------=_NextPart_000_0248_01C814D0.2778A430--