Cant recover postgres database

Forum with tips, support, etc, on using the PostgreSQL database with Poker Tracker. Please post any PostgreSQL questions here.

Cant recover postgres database

Postby Hasuwisp » Fri Nov 28, 2008 10:05 pm

Several days ago my postgres died, and all i have is the data directory of my postgres database.
I used both methods of recovery i found here:
1:

I"f you don't have any recent backups then this is what you will need to do to try to recover the databases...
1. Create a new folder on your C drive called PostgreSQL_Data.
2. Go to the c:\program files\postgresql\8.2 folder. Right-click on the "data" folder and select "Copy" from the popup menu.
3. Go to the newly created c:\PostgreSQL_Data folder and right-click and select "Paste" from the popup menu.
4. Now, go to the Start menu and select Settings > Control Panel > Add or Remove Programs and then remove PostgreSQL 8.2 from the list.
5. From the Start menu again select Run. On the window that opens type "COMMAND" and hit OK. This will open a DOS window. Type the following next to the prompt...
net user postgres /delete
and hit ENTER to run it. Then type EXIT to close the DOS window.
6. Now, download and reinstall PostgreSQL as directed here:
http://www.pokertracker.com/products/PT ... nstallSQL2
WITH THE EXCEPTION THAT on the second window where it asks you where you want to install PostgreSQL click on the "Data Directory" button and navigate to the c:\PostgreSQL_Data\data folder and select that. This will force it to try to reuse your old data.
CONTINUE until you get to the window that has the "Initialize Database Cluster" box at the top left corner. UNCHECK THIS BOX and click the Next button and then just continue installing from there.
7. Once the install is done, RESTART YOUR COMPUTER and then try to open PT again."

Couldnt start postgres: cant connect to server make sure port: 5234 is open long message (direct through pgadmin) or the service started and was disabled cause it not active/used(administrative tools\services) .

and 2:

by moderator kraada here viewtopic.php?f=17&t=12017&p=56124*hilit=recover
logger shutting down after i type second command in guide, after i type 3rd command: "psql" i get coudnt connect ot server.

Would like to know can someone from support can try and copy my data directory .rar(300mb) file and try to restore db in and backup it in tracker after. Ill pay 100$ if hell suceed.
Hasuwisp
 
Posts: 54
Joined: Fri Nov 28, 2008 9:41 pm

Re: Cant recover postgres database

Postby ptrack pat » Fri Nov 28, 2008 10:36 pm

In the new PostgreSQL_data folder, is there a file called postmaster.pid there? If so, delete it then restart the computer and try to start the service again. Does this work?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: Cant recover postgres database

Postby Hasuwisp » Fri Nov 28, 2008 11:02 pm

No, there is no such file at all comp, and i enabled search in hidden/sytem files.
Hasuwisp
 
Posts: 54
Joined: Fri Nov 28, 2008 9:41 pm

Re: Cant recover postgres database

Postby Hasuwisp » Fri Nov 28, 2008 11:14 pm

Os is XP sp1/sp2(2 comps couldnt recover at any). postgres was 8.2 reinstalled and tried to recover with the same postgres.
Hasuwisp
 
Posts: 54
Joined: Fri Nov 28, 2008 9:41 pm

Re: Cant recover postgres database

Postby ptrack pat » Sat Nov 29, 2008 12:05 am

I'll PM you with directions on how to send the .rar file to me so I can try to recover it.
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: Cant recover postgres database

Postby Hasuwisp » Sat Nov 29, 2008 6:48 pm

tnx to ptrack pat the problem was solved: i missed directory in data, had to just create it.
Hasuwisp
 
Posts: 54
Joined: Fri Nov 28, 2008 9:41 pm


Return to PostgreSQL Forum

Who is online

Users browsing this forum: No registered users and 7 guests

cron