Home > Archive > PostgreSQL Discussion > August 2005 > Resore PG-Data from Files after crash









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Resore PG-Data from Files after crash
tomtailor@freesurf.fr

2005-08-25, 11:23 am

Hi!

I've the following Problem and hope someone can help me. My PostgreSQL
Database were running on a Debian Linux. Some day the OS crahsed and -
here's the Problem - there is no dump file from Database. But I still
have the files in base, global, pg_clog. So I did a fresh setup and
copied the files in the pg data directory. But even I try to start via
pg_ctl fails caus:

Starting PostgreSQL database server: postmaster(FAILED)
ERROR: There is no PostgreSQL database framework in /srv/postgres/data.
Run initdb as the postgres user to create it

I don't want to run initDB because the dir isn't empty - of course I
copied my old data files in there.

What can I do?

Thank you!!

Christian Meier

Martijn van Oosterhout

2005-08-26, 11:23 am

On Thu, Aug 25, 2005 at 08:56:40AM -0700, tomtailor@freesurf.fr wrote:
> Hi!
>
> I've the following Problem and hope someone can help me. My PostgreSQL
> Database were running on a Debian Linux. Some day the OS crahsed and -
> here's the Problem - there is no dump file from Database. But I still
> have the files in base, global, pg_clog. So I did a fresh setup and
> copied the files in the pg data directory. But even I try to start via
> pg_ctl fails caus:


Looks like you're missing at least pg_xlog (which resetxlog might fix
for you) and PGVERSION (which is just a tag file).

I recommand running initdb on an empty directory and copy the stuff you
do have over the top and see if that works...

Keep a backup though...
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


Tom Lane

2005-08-26, 11:23 am

tomtailor@freesurf.fr writes:
> Starting PostgreSQL database server: postmaster(FAILED)
> ERROR: There is no PostgreSQL database framework in /srv/postgres/data.
> Run initdb as the postgres user to create it


There is no such error string in Postgres proper -- I suppose the
complaint is coming from whatever start script you use. Most of the
start scripts I've seen just look for a PG_VERSION file, and maybe
check its contents.

See
http://www.postgresql.org/docs/8.0/static/storage.html
for some information about what needs to be there.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

tomtailor@freesurf.fr

2005-08-30, 7:24 am

THX for Help, but it seems that there is no way get it fixed ...

So long ...
Christian

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com