Re: Please help (backup) - Mailing list pgsql-admin

From Phillip Smith
Subject Re: Please help (backup)
Date
Msg-id 01e701c81465$d186bd60$9b0014ac@wbaus090
Whole thread Raw
In response to Please help (backup)  (Anibal David Acosta <aa@personal.net.py>)
List pgsql-admin
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

> -----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)
>
> 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?
>
>                http://archives.postgresql.org


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.  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.

pgsql-admin by date:

Previous
From: Anibal David Acosta
Date:
Subject: Please help (backup)
Next
From: "Phillip Smith"
Date:
Subject: Re: Please help (backup)