PDA

View Full Version : Easy question about old and new DB's



j22
03-30-2010, 02:08 PM
Hey all,

I just put in a brand new HD w/ windows 7. I also started a new DB w/ this install. What is my best way to take a peak at the old DB? I'm not sure I even want to transfer any of the data over, I just need to view it for records purposes (taxes, etc). Is there an easy way to do this? It is currently on a seperate HD running windows XP. To the best of my knowledge I could still boot up off of this drive if I had to, but I would rather not.

Thanks,

-j

fozzy71
03-30-2010, 04:23 PM
The easiest way is to uninstall your current postgresql installation and rename the leftover \PostgreSQL\8.4\data folder so you can reinstall it later. You also need to make sure you delete the postgres user from the command prompt window. Then copy your old \postgresql\8.x\data folder to your new HD. You need to install the same version of postgresql that the \data folder was created with. Most likely this is 8.3.8 if you originally used our postgresql.zip package to install postgresql with.

Please update to the latest beta - http://www.holdemmanager.com/downloads/HmBetaUpdate.exe

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location. In your case you want to rename the existing \data folder and create a new folder or all new install path for reinstalling the old \data folder to.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your old DB using these instructions - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.

j22
03-30-2010, 07:01 PM
That was the, "easy," way? :P

So to summarize, this will enable me to view/use the old DB by changing my version of SQL to that of whatever the old DB used. To use my new DB again, I will have to remove the older version of SQL just installed and reinstall the newest version and connect it w/ the new DB.

Maybe I should just boot up off the old drive? No reason it shouldn't work (won't use the 8 gigs of ram I have since its windows XP) but other then that it should just be what I was running 2 weeks ago? (New video cards as well but I can install drivers for those).

Thanks,

-j

netsrak
03-31-2010, 06:59 AM
You can have 2 different postgresql servers running on different ports.

Install the old version as Fozzy explained and use Port 5433 with initializing the old data folder for this postgresql installation.

For the new postgresql installation you use default port 5432.

To switch between the databases/postgresql versions you need to change the port in the HEM database management.