pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedCan a broken Postgresql data directory be reconstructed without losing data?
4+ messages / 3 participants
[nested] [flat]
* Can a broken Postgresql data directory be reconstructed without losing data?
@ 2018-04-15 08:25 A A <fellah.tech@yahoo.com>
2018-04-15 11:43 ` Re: Can a broken Postgresql data directory be reconstructed without losing data? Ricardo Martin Gomez <rimartingomez@hotmail.com>
2018-04-15 12:48 ` Re: Can a broken Postgresql data directory be reconstructed without losing data? Michael Paquier <michael@paquier.xyz>
0 siblings, 2 replies; 4+ messages in thread
From: A A @ 2018-04-15 08:25 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
I'm trying to restore a database from a broken data directory that have lost many of its files accidentally.
I have tried unsuccessfully to install new instance of the same Postgresql version and then copy (with overwrite) the broken datadir to the new one.here the remaining datadir that I'm working on :
|-base
|---1
|---16384
|---17950
|---19621
|---pgsql_tmp
|-global
|-pg_multixact
|---members
|---offsets
|-pg_notify
|-pg_stat_tmp
|-pg_tblspc
|-pg_xlog
|---archive_status
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Can a broken Postgresql data directory be reconstructed without losing data?
2018-04-15 08:25 Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
@ 2018-04-15 11:43 ` Ricardo Martin Gomez <rimartingomez@hotmail.com>
2018-04-15 12:34 ` Re: Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Martin Gomez @ 2018-04-15 11:43 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; A A <fellah.tech@yahoo.com>
You must to restore a database from a backup.
Regards.
Obtener Outlook para Android<https://aka.ms/ghei36;
________________________________
From: A A <fellah.tech@yahoo.com>
Sent: Sunday, April 15, 2018 5:25:05 AM
To: pgsql-general@lists.postgresql.org
Subject: Can a broken Postgresql data directory be reconstructed without losing data?
I'm trying to restore a database from a broken data directory that have lost many of its files accidentally.
I have tried unsuccessfully to install new instance of the same Postgresql version and then copy (with overwrite) the broken datadir to the new one. here the remaining datadir that I'm working on :
|-base
|---1
|---16384
|---17950
|---19621
|---pgsql_tmp
|-global
|-pg_multixact
|---members
|---offsets
|-pg_notify
|-pg_stat_tmp
|-pg_tblspc
|-pg_xlog
|---archive_status
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Can a broken Postgresql data directory be reconstructed without losing data?
2018-04-15 08:25 Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
2018-04-15 11:43 ` Re: Can a broken Postgresql data directory be reconstructed without losing data? Ricardo Martin Gomez <rimartingomez@hotmail.com>
@ 2018-04-15 12:34 ` A A <fellah.tech@yahoo.com>
0 siblings, 0 replies; 4+ messages in thread
From: A A @ 2018-04-15 12:34 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; Ricardo Martin Gomez <rimartingomez@hotmail.com>
Well this doesn't address the question at all.
On Sunday, April 15, 2018, 1:44:00 PM GMT+2, Ricardo Martin Gomez <rimartingomez@hotmail.com> wrote:
You must to restore a database from a backup.
Regards.
Obtener Outlook para Android
From: A A <fellah.tech@yahoo.com>
Sent: Sunday, April 15, 2018 5:25:05 AM
To: pgsql-general@lists.postgresql.org
Subject: Can a broken Postgresql data directory be reconstructed without losing data?
I'm trying to restore a database from a broken data directory that have lost many of its files accidentally.
I have tried unsuccessfully to install new instance of the same Postgresql version and then copy (with overwrite) the broken datadir to the new one. here the remaining datadir that I'm working on :
|-base
|---1
|---16384
|---17950
|---19621
|---pgsql_tmp
|-global
|-pg_multixact
|---members
|---offsets
|-pg_notify
|-pg_stat_tmp
|-pg_tblspc
|-pg_xlog
|---archive_status
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Can a broken Postgresql data directory be reconstructed without losing data?
2018-04-15 08:25 Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
@ 2018-04-15 12:48 ` Michael Paquier <michael@paquier.xyz>
1 sibling, 0 replies; 4+ messages in thread
From: Michael Paquier @ 2018-04-15 12:48 UTC (permalink / raw)
To: A A <fellah.tech@yahoo.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sun, Apr 15, 2018 at 08:25:05AM +0000, A A wrote:
> I'm trying to restore a database from a broken data directory that
> have lost many of its files accidentally.
Let me guess, a wild set of rm commands?
> I have tried unsuccessfully to install new instance of the same
> Postgresql version and then copy (with overwrite) the broken datadir
> to the new one.here the remaining datadir that I'm working on :
This is the kind of things I have found myself doing some times, as well
as some people on this list, and this enters in the category of horror
stories.
So the answer to the question "Can I work on a broken data folder and
save as much data as possible?" is "yes". However this enters in the
field of dark magics as this requires advanced skills and knowledge of
PostgreSQL, including its internals, its folder structure, and ways to
bypass some protocols or even perhaps patch the upstream code to bypass
some checks to the data you are looking for... Additionally, this is
usually a step-by-step and case-by-case problem.
Please note that data deleted is gone. You may be able to get back some
data from the file system which has been deleted, though this requires a
special set of skills and luck. Hiring a professional is recommended
for such operations.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-04-15 12:48 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-15 08:25 Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
2018-04-15 11:43 ` Ricardo Martin Gomez <rimartingomez@hotmail.com>
2018-04-15 12:34 ` Re: Can a broken Postgresql data directory be reconstructed without losing data? A A <fellah.tech@yahoo.com>
2018-04-15 12:48 ` Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox