PDA

View Full Version : Attempting to retrieve database after hard drive damaged



ads
02-04-2009, 02:14 PM
Hi, I hope this is the correct place to post about my problem. If not, please direct me or move this thread to where it should be.

My laptop's hard drive was damaged recently but I was able to back up some data, and have been able to retrieve the postgresql folder in program files within the hard drive. Since this was about 39 gb I presumed it to be where the database was stored. I am not sure what the next steps are towards getting my database functioning as it was before. I have downloaded holdem manager and re-entered my serial number and then it comes to the sql connection window. All the files from a the postgresql folder in my old database are on my hard drive. I have downloaded the postresql installer and got to the stage asking for "a password for the database superuser and service account (postgres)". I don't know if this would be an old password or what so I haven't continued with the installation. I hope I have explained the situation ok, any questions please ask. By the way, upon clicking the link for "Postgresql install instructions", it takes me to a page with a link to a setup package which is a zip file which doesn't seem to be active any more. My installation package was downloaded from http://www.postgresql.org/download.

I appreciate any help on this matter. I just hope I will be able to get my database functioning once again!

morny
02-04-2009, 02:32 PM
From experience this rarely works when copying from one PC to another like this and it simply wont connect. You can try it though:

if you have installed postgresql again then turn off the service by finding PostgreSQL in the Start Menu and using the Stop Service option. Then delete the \Data folder in the new installation of postgres and copy your backed up \Data folder over. if you can't delete then you may need to reboot.

Then in the PostgreSQL menu click on Start Service and if everything went right you should be able to connect to your old database.

If you dont have postgreSQL installed then install it first then follow those instructions

ads
02-04-2009, 03:04 PM
thanks - I have reinstalled postgresql and replaced the /data folder with the other copy, but still when I try to connect to postgresql (when I start holdem manager) I am still gettin the message that the connection cannot be made and that holdem manager is unable to start the service. Does this mean it is not going to work? I did stop and start the service while replacing the data folder. Also, I used the password postgrespass when asked during the installation process.

morny
02-04-2009, 03:24 PM
Yeah most likely, if you go to the event viewer in Control Panel > Admin Tools an look for what the postgreSQL error is it will probably be something like cant find xxx and it just wont work

ads
02-04-2009, 05:50 PM
yeah it says

2009-02-04 18:49:00 GMT FATAL: could not remove old lock file "postmaster.pid": Permission denied
2009-02-04 18:49:00 GMT HINT: The file seems accidentally left over, but it could not be removed. Please remove the file by hand and try again.

Would this suggest that I have to now create a new database?

morny
02-05-2009, 06:45 PM
Then go to C:\Program Files\PostgreSQL\8.2\data and delete the postmaster.pid file then restart the PostgreSQL service again, if it dosent work give it a minute and try again and if it dosent start check what the new error is