From: | "Jay W(dot) Summet" <jay(at)summet(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Restoreing from a Unix TAR backup of data directory... |
Date: | 1999-03-16 11:21:22 |
Message-ID: | 199903161921.LAA10445@fnord.nwinfo.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm using BSDI 4.0, intel x86:
I have a backup of my /usr/local/pgsql/data directory (and all sub
dirs) made using the Unix TAR command while the database was not
active.
At the time, I was using Postgresql version 6.1. I now need to
restore from this backup. I've obtained (thanks the the help of
various people on this mailing list) a copy of PG version 6.1, and PG
version 6.1.1.
I installed Postgresql on my system, and then did a "tar -xvpf
backupfilename.tar" command to overwrite the "data" directory with my
data. However, this did not allow me to access the data.
Every time I attempt to start a PSQL session, I get the following
message:
-----cut-----
Connection to database 'billing' failed.
PQexec() -- Request was sent to backend, but backend closed the
channel before r esponding. This probably means the backend
terminated abnormally before or whil e processing the request.
-----cut----
I traced the problem down to the postgres session that the postmaster
started up, and I ran one on it's own:
-------cut---------
fnord:/usr/local/pgsql/bin $ postgres -d9 -o debug.txt
-D /usr/local/pgsql/data billing
---debug info---
Quiet = f
Noversion = f
stable = f
timings = f
dates = Normal
bufsize = 64
query echo = f
multiplexed backend? = f
DatabaseName = [billing]
----------------
InitPostgres()..
Segmentation fault
----cut------
(Note: At the end of this run, the debug.txt file was empty)
If I install the PG version 6.1 (or 6.1.1) and do a initdb, and then
attempt to access the default (template1) db, everything works just
fine. (Instead of a Segmentation fault, I get:
------cut----
POSTGRES backend interactive interface
$Revision: 1.33 $ $Date: 1997/04/24 03:39:09 $
------cut----
and I can use the database system without any problems, but
it doesn't help me get to my backed up data)
I have tried to also issue a "create database billing" command
in the template1 database, and THEN overwrite ONLY the
"/usr/local/pgsql/data/base/billing" dirctory with my backed up data.
In this case, I could use the psql session to connect to the
"template1" database, but I got the same problem detailed above when
I tried to connect to the "billing" database.
The PG_VERSION files from my backups say "6.1" as well as the
PG_VERSION files from the PG 6.1 and PG 6.1.1 installations.
So, my questions are:
a) Does anybody know why my backed up data is causing the postgres
process to do a seg fault when it tries to read it?
b) Anybody know how to fix it?
c) Lacking that ability, is there a way to extract the raw data from
the backed up database files without using the postgres engine?
Thanks,
Jay W. Summet
From | Date | Subject | |
---|---|---|---|
Next Message | The Hermit Hacker | 1999-03-16 21:58:50 | Re: [GENERAL] Restoreing from a Unix TAR backup of data directory... |
Previous Message | Anto Prijosoesilo | 1999-03-16 10:46:36 | Problem with backend crashing |