PDA

View Full Version : Had to reinstall Vista, but still have DB on second hard drive



AntiMatter
01-28-2011, 09:12 AM
So I suddenly fried my computer and had to reinstall Vista :(

However, I previously had my PostgreSQL HEM database set up on a different drive to PostgreSQL (E.g. in F:\PostgreSQL_HEM). The data is still there and I can still see it.

I have done a complete reinstall of Vista, HEM, PostgreSQL etc. How do I now get everything back up and running?

Thanks in advance

netsrak
01-28-2011, 01:38 PM
You need to uninstall postgresql again and download and install the same postgresql version you had before (PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)) and follow this FAQ: FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)

AntiMatter
01-31-2011, 11:50 AM
I'm not sure that's quite what I need to do.... This was my setup:

Drive C: Windows Vista (now gone, reinstalled).
PostgreSQL (now gone)

Drive F: My HEM database in F:\PostgreSQL_HEM (I still have this)

I had the HEM database running from a different tablespace to the default installation. E.g. tablespace "HEM", which was located in F:\PostgreSQL_HEM. This folder contains a folder "641707", containing lots of data in files with a number e.g. 1247..... 1952172".

I have installed PostgreSQL on the new windows Vista, created a tablespace pointing to the F:\PostgreSQL_HEM, is there anyway I can get it to see my old database?

This database is huge, and I would like to get it up and running again. Any help much appreciated.

Patvs
01-31-2011, 11:11 PM
If you reinstall the same version of SQL (8.3.x / 8.4.x) to the same location, it should automatically detect any old database.

Use the installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)

AntiMatter
02-01-2011, 09:42 AM
You mean install to SQL to drive C (where it was originally, not to drive F, where the database is)? Then it should detect the database on drive F?

It doesn't seem to see it!?

netsrak
02-01-2011, 10:14 AM
I think you can select the data folder during the installation?
Try the folder on F:

AntiMatter
02-01-2011, 11:59 AM
I think you can select the data folder during the installation?
Try the folder on F:

Thanks for the help....

Hmmn I tried following the instructions above e.g:
FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)

However, it gives the following error: "The specified data directory does not contain an existing database cluster. Installing without intitializing a database cluser in this case will produce an installation that will not start. Are you sure you want to continue without running initdb?"


Cheers

netsrak
02-01-2011, 02:25 PM
That means that the versions of your data folder and the new postgresql installation are not compatible. It only works with similar postgresql releases (8.2.x for example or 8.3.x).

AntiMatter
02-01-2011, 03:14 PM
That means that the versions of your data folder and the new postgresql installation are not compatible. It only works with similar postgresql releases (8.2.x for example or 8.3.x).

Both 8.3, I'm sure! Does the x need to be the same?

Sarek
02-02-2011, 08:02 AM
no need the same "x"
just try to do installation correct

AntiMatter
02-02-2011, 04:08 PM
I am following the above instructions precisely.

When I try to install to the folder
F:\PostgreSQL_HEM
I get ""The specified data directory does not contain an existing database...."
The F:\PostgreSQL_HEM, containing the HEM database is fully intact.
The only issue may be that I initially tried to create a tablespace here with a later install of PostgreSQL. I then uninstalled PostgreSQL and then followed your instructions above.


I have a half-rescued folder:
C:\Program Files\PostgreSQL
When I try to install here using the above instructions, the install appears to work. However, the Postgres service cannot be started. This folder would appear to be corrupted, I could not retrieve everything when rescuing my computer.


Thanks for the help, much appreciated

netsrak
02-03-2011, 04:35 AM
Nothing more we can do - you should install postgresql with a new empty data folder, create a new database and reimport all your hands from the archive.