pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgresql global directory
2+ messages / 2 participants
[nested] [flat]

* Postgresql global directory
@ 2004-12-21 17:34  HOWARD,EDWARD T,III <ETHoward@mail.ifas.ufl.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: HOWARD,EDWARD T,III @ 2004-12-21 17:34 UTC (permalink / raw)
  To: pgsql-admin



Hi,

	I have a doozy of a problem.  Had a dataserver crash hard (it
was hacked and the root kit used broke a lot of files), this happened
after a motherboard went on my backup server, corrupting my backup set.
We have gotten most of the data recovered, however the control files.
Pg_control, x_log, c_log, and the entire global directory has been
dumped into lost+found.

So my question is this.  Does anybody know how to create a new global
directory using an existing data set (that was not created by dump)?  I
do not have a dump of the data, that would be too easy.  My outdated
postgres book says this can be done by using -t with pg_ctrl....however,
with the later versions of postgresql, they have taken that switch out.
I have tried googling it and have come up empty.

I'm using postgresql version 7.2.2-1


Any help would be greatly appreciated,

Ed Howard
Systems Administrator
G120 McCarty Hall
392-1881 ext. 319
ethoward@mail.ifas.ufl.edu

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Postgresql global directory
@ 2004-12-21 19:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: HOWARD,EDWARD T,III <ETHoward@mail.ifas.ufl.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2004-12-21 19:21 UTC (permalink / raw)
  To: HOWARD,EDWARD T,III <ETHoward@mail.ifas.ufl.edu>; +Cc: pgsql-admin

"HOWARD,EDWARD T,III" <ETHoward@mail.ifas.ufl.edu> writes:
> 	I have a doozy of a problem.  Had a dataserver crash hard (it
> was hacked and the root kit used broke a lot of files), this happened
> after a motherboard went on my backup server, corrupting my backup set.
> We have gotten most of the data recovered, however the control files.
> Pg_control, x_log, c_log, and the entire global directory has been
> dumped into lost+found.

Yipes.  I'm afraid you're very possibly screwed :-(.  It would not be
hard to identify pg_control and the pg_xlog files by size and content,
and with sufficient determination you might do the same for all the
files in global/, but there's no real good way to tell one pg_clog
file from another.

However there is a glimmer of hope: there very possibly *is* only one
pg_clog file, if you had a not-too-high-volume server and you'd been
keeping it vacuumed religiously.  If so then (in principle) you can
identify all the files and put them back.

> So my question is this.  Does anybody know how to create a new global
> directory using an existing data set (that was not created by dump)?

You will not get a useful solution that way.  The files are too
interdependent, you can't plug in files from another installation
without breaking things.  What you've got to do is reassemble the jigsaw
puzzle by putting each file back in its proper place.

What I'd suggest is that you make a temporary installation in another
place with a fresh initdb and load your latest available backup into it
(you do have *some* backup I trust).  That will give you a reference to
compare to as you try to identify the files.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2004-12-21 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-21 17:34 Postgresql global directory HOWARD,EDWARD T,III <ETHoward@mail.ifas.ufl.edu>
2004-12-21 19:21 ` Tom Lane <tgl@sss.pgh.pa.us>

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