Re: Trying to restore a PostgreSQL-9.6 database from an old complete dump and/or a up-to-date just base directory and other rescued files

From: al <al(at)blogmail(dot)cc>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Trying to restore a PostgreSQL-9.6 database from an old complete dump and/or a up-to-date just base directory and other rescued files
Date: 2020-02-20 17:24:21
Message-ID: db0c2ed4-4b2f-b0d9-33db-382f391cabcd@blogmail.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 20/2/20 15:47, Tom Lane wrote:
>
> Unfortunately, not having an up-to-date copy of the xlog info is
> practically fatal to your hopes of getting back consistent data.
> [...]
>
Ok, so if the only way to restore the data is getting the content in
pg_xlog directory I'm looking for it.

I went to my restored pg_xlog directory and I found that it has an empty
directory called arhive_status and 7 binary files with names:
00000001000000000000000A
00000001000000000000000B
00000001000000000000000C
00000001000000000000000D
00000001000000000000000E
00000001000000000000000F
000000010000000000000010

pg_filedump recognize them as a PostgreSQL files but doesn't show
anything, I'm going to try with pg_xlogdump. Is my first time for me
trying to use this program, so sintax is not familiar to me, so, anyway
I saw that those files have each exactly the size of 16777216 bytes, so
is easier to try to find some files with that size in my lost+found. I
got 5 files with that size the names are:
#288294 (date 2019-04-01)
#288287 (date 2019-05-14)
#288293 (date 2019-07-02)
#261307 (date 2019-11-27)
#270185 (date 2020-01-28)
(the inode name where ddrescue found)

Ok, they are not 7 but maybe I don't need 7 (I don't know), maybe I have
7 now because I was testing some restores from dump in addition at the
first one. Also my old dump is from 2019-04-23, so the first one could
be the same?

So my next step is going to try to read those files with pg_xlogdump
and/or trying to name them with those namefiles (beginning with
00000001000000000000000A by date). In the meantime I'm going to wait
from other help from you, because is my first time studying PostgreSQL
File Layout. It's fascinating but is huge documentation and I need some
orientation to no lose the path to my particular issue. Thank you so much.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albrecht Dreß 2020-02-20 18:24:14 Error “cache lookup failed for function”
Previous Message Tom Lane 2020-02-20 14:47:37 Re: Trying to restore a PostgreSQL-9.6 database from an old complete dump and/or a up-to-date just base directory and other rescued files