Thread: Help me please...

Help me please...

From
"Roseller A. Romanos"
Date:
Please help me with this. I really need your advice as to how to retrieve the data in my postgresql database.

I have postgresql installed in Windows XP platform five months ago. Just yesterday my OS bugged down and saying NTDLR is missing.  What I did was I re-installed my OS. When I finished my installation I found out that I cannot access anymore my postgresql using PGAdmin III.

What should I do to access my database and retrieve the important records in it?          

Unfortunately, I have not created a backup of it.  Please help me.

Thanks in advance and God bless...

 
Roseller Romanos
STI-Pagadian
Gillamac Building, Pagadian City
Office Nos: (062) 2144-785
Home Nos: (062) 2144-695
Mobile Nos: 09203502636


Re: Help me please...

From
Date:

do the DB folders still exist? if so back them up, reinstall Postgres (reinstalling XP probably wiped out either DLL's or registry entries) and relaunch it. don't have it initialize a DB on install

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Roseller A. Romanos
Sent: Wednesday, July 08, 2009 9:37 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Help me please...

 

Please help me with this. I really need your advice as to how to retrieve the data in my postgresql database.

I have postgresql installed in Windows XP platform five months ago. Just yesterday my OS bugged down and saying NTDLR is missing.  What I did was I re-installed my OS. When I finished my installation I found out that I cannot access anymore my postgresql using PGAdmin III.

What should I do to access my database and retrieve the important records in it?          

Unfortunately, I have not created a backup of it.  Please help me.

Thanks in advance and God bless...

 

Roseller Romanos
STI-Pagadian
Gillamac Building, Pagadian City
Office Nos: (062) 2144-785
Home Nos: (062) 2144-695
Mobile Nos: 09203502636

 

 

Re: Help me please...

From
Date:

if you used default locations I believe it should be (this is from memory mind) under c:\program files\postgres\<version>\data\

 

data is the folder you want.

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of jacob@aers.ca
Sent: Thursday, July 09, 2009 1:18 PM
To: don2_907@yahoo.com; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Help me please...

 

do the DB folders still exist? if so back them up, reinstall Postgres (reinstalling XP probably wiped out either DLL's or registry entries) and relaunch it. don't have it initialize a DB on install

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Roseller A. Romanos
Sent: Wednesday, July 08, 2009 9:37 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Help me please...

 

Please help me with this. I really need your advice as to how to retrieve the data in my postgresql database.

I have postgresql installed in Windows XP platform five months ago. Just yesterday my OS bugged down and saying NTDLR is missing.  What I did was I re-installed my OS. When I finished my installation I found out that I cannot access anymore my postgresql using PGAdmin III.

What should I do to access my database and retrieve the important records in it?          

Unfortunately, I have not created a backup of it.  Please help me.

Thanks in advance and God bless...

 

Roseller Romanos
STI-Pagadian
Gillamac Building, Pagadian City
Office Nos: (062) 2144-785
Home Nos: (062) 2144-695
Mobile Nos: 09203502636

 

 

Re: Help me please...

From
John R Pierce
Date:
jacob@aers.ca wrote:
>
> if you used default locations I believe it should be (this is from
> memory mind) under c:\program files\postgres\<version>\data\
>
>
>
> data is the folder you want.
>
>
>

First, verify the location of pgdata...

    sc qc pgsql-8.3

(I'm assuming this is 8.3, modify for other versions)
note the value of the -D parameter on the BINARY_PATH_NAME, like...

        BINARY_PATH_NAME   : D:\postgres\8.3\bin\pg_ctl.exe runservice
-w -N "pgsql-8.3" -D "D:\postgres\8.3\data\"

hence, mine is D:\postgres\8.3\data\

If you've reinstalled postgres from scratch, you'll likely have to do a
bit of dinking around.

First,

    NET STOP pgsql-8.3

Now, MOVE the current data dir somewhere safe, and COPY/S your backup of
the DATA directory to the active location.   Then, use the 'security'
dialog in file explorer, or the CACL command line, to grant the
'postgres' user full control over the data directory and all files in it.

command line version:

    cacls /t /e /c /g postgres:f \path\to\data

if this postgres user already existed from before, but the reinstalled
postgres service is having problems starting, you may need to reset the
service account password.    pick a random forgettable password.   I'm
going to use shattUp373treHodhu (random generator output)...

    NET USER postgres shattUp373treHodhu
    SC CONFIG pgsql-8.3 password= shattUp373treHodhu

upper case doesn't matter in the commands except for the password itself
but the spacing around the password=  is critical (none before the =,
one space after)

then try

    net start pgsql-8.3

and with any luck, your data is all intact.

its absolutely critical if you've reinstalled postgres that you install
the same version as you used before.