X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E480E3A6318 for ; Tue, 21 Dec 2004 19:21:26 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55812-03 for ; Tue, 21 Dec 2004 19:21:22 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EF7023A5EAC for ; Tue, 21 Dec 2004 19:21:22 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id iBLJLL2x024924; Tue, 21 Dec 2004 14:21:21 -0500 (EST) To: "HOWARD,EDWARD T,III" Cc: pgsql-admin@postgresql.org Subject: Re: Postgresql global directory In-reply-to: References: Comments: In-reply-to "HOWARD,EDWARD T,III" message dated "Tue, 21 Dec 2004 12:34:37 -0500" Date: Tue, 21 Dec 2004 14:21:21 -0500 Message-ID: <24923.1103656881@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/216 X-Sequence-Number: 15802 "HOWARD,EDWARD T,III" 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