PDA

View Full Version : Is it possible to restore a database from the postgreSQL program folder?



itsavest
02-13-2009, 02:16 PM
Hi, I did format C: and I didn't back up my HM database because I thought I would reimport all the hands from a processed hands backup folder. But now there are many hands missing in this folder.

I still have the program folder of my old postgreSQL installation and there is a lot of data in there (but in a format I don't understand). Is there a chance that I can somehow import the old database in my new installation?

If not, I am screwed :/

morny
02-13-2009, 03:24 PM
You can try but its a bit complicated and dosent work too often. Here are the details:

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

Then in the PostgreSQL menu click on Start Service instead of stop service and if everything went right you should be able to connect to your old database however alot of times it dosent work as this is not the correct way to do it

jfreels
04-01-2009, 01:10 AM
where do we go from there if that does not work?

I bought a new computer and had windows 7 installed on it on a new hard drive. I didn't backup my old databases from an old pqsl 8.2 install, but I still have the entire data folder. I installed windows xp on yet another new hard drive. I tried installing 8.2 in windows xp on a new hard drive and copying over the data folder, but the service no longer starts after copying the data folder over.

morny
04-01-2009, 10:05 AM
If you still have access to the other drive you should have your files archived to C:/HMarchive or another folder you specified. You can create a fresh install on the new PC and import those files if you cant get access to the old one