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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: al <al(at)blogmail(dot)cc>
Cc: 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 14:47:37
Message-ID: 6703.1582210057@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

al <al(at)blogmail(dot)cc> writes:
> Hello. I'm trying to restore/rescue a database from some that I have:
> * I have all the recent files in PGDATA/base
> (/var/lib/postgresql/9.6/main/base/), but I have not the complete
> /var/lib/postgresql/9.6/main/
> * I have all files from an old backup (and not much different) dump
> that I restored in a new installation of PostgreSQL-9.6.
> * I have a lot of rescued files from the hard drive (from ddrescue)
> and I got thousand of files without a name (having a "#" and then a
> number instead and in lost+found directory), so, for instance:
> * I have the pg_class file
> * I have the pg_clog directory with 0000 file
> I have not:
> * I have not the original content in pg_xlog directory (I have an
> old one, maybe, if it didn't changed, it still being useful)

Unfortunately, not having an up-to-date copy of the xlog info is
practically fatal to your hopes of getting back consistent data.

There are some Postgres support companies who specialize in data recovery;
if this data is worth money to you, go hire a specialist. The chance
of hacking your way to a usable fix without knowing exactly what you're
doing is nil. (A specialist might not be successful either, of course.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message al 2020-02-20 17:24:21 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
Previous Message al 2020-02-20 09:54:54 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