Thread: recovering windows database after crash

recovering windows database after crash

From
Judicaël Dehotin
Date:
Hello,

I have postgresql 8.0 under windows, with pgadmin 3
Unfortunaly i have met a problem with postgresql which obliged me to
reinstall  postgresql.  The bad thing is i have no backup of my database
before the crash (shame on me !!  ;-))  )

So i wonder if it is possible, with the  folder of
/postgreql/data/8.0/data/base  which seem contain already the
directories of my database , to recover it ?

MAny thanks for your answer !

Judical Dehotin

--
**************************************************************
Judicaël DEHOTIN
PhD Student
CEMAGREF
Unité de Recherche Hydrologie-Hydraulique
3 bis, Quai Chauveau, CP 220
69336 Lyon Cedex 9          France

Tel: (33) 4 72 20 86 11
Fax: (33) 4 78 47 78 75

email: dehotin@lyon.cemagref.fr ou dehotin@hotmail.com
**************************************************************


Re: recovering windows database after crash

From
"Magnus Hagander"
Date:
> Hello,
>
> I have postgresql 8.0 under windows, with pgadmin 3
> Unfortunaly i have met a problem with postgresql which
> obliged me to reinstall  postgresql.  The bad thing is i have
> no backup of my database before the crash (shame on me !!  ;-))  )
>
> So i wonder if it is possible, with the  folder of
> /postgreql/data/8.0/data/base  which seem contain already the
> directories of my database , to recover it ?

Assuming yo uhave all the files, sure. Just run the installer again (make sure you use the same version you had
before!!),set the data directory to the same you had before, and make sure th einstaller is set *not* to run initdb. It
shouldpick it up automatically. 

//Magnus

Re: recovering windows database after crash

From
"Jim C. Nasby"
Date:
On Tue, Nov 15, 2005 at 07:24:02PM +0100, Magnus Hagander wrote:
> > Hello,
> >
> > I have postgresql 8.0 under windows, with pgadmin 3
> > Unfortunaly i have met a problem with postgresql which
> > obliged me to reinstall  postgresql.  The bad thing is i have
> > no backup of my database before the crash (shame on me !!  ;-))  )
> >
> > So i wonder if it is possible, with the  folder of
> > /postgreql/data/8.0/data/base  which seem contain already the
> > directories of my database , to recover it ?
>
> Assuming yo uhave all the files, sure. Just run the installer again (make sure you use the same version you had
before!!),set the data directory to the same you had before, and make sure th einstaller is set *not* to run initdb. It
shouldpick it up automatically. 

And to be safe make a backup of the entire directory
(/postgresql/data/8.0) if you can.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461