Page 1 of 2

Transfer of data

PostPosted: Sun May 15, 2011 7:19 pm
by Mountain runner
I had to reboot my PC and after that I couldnt set up my old Postgres database to work, so I moved it to another disc as a back up and created new Postgres database that works with PT3. The thing is, I had 30GB of hand histories on my old database and I want to somehow add them to my new database.
What is the best way to do it? Can I somehow copy-past the files from "PostgreSQL\8.3\data\base" folders or there is another way to do it?

Re: Transfer of data

PostPosted: Mon May 16, 2011 3:46 am
by WhiteRider
Do you mean you had to reinstall, rather than "reboot"?

If you still have the original hand history files you will probably find it easiest to re-import from those into your new database.
Otherwise you should be able to reconnect to the old data folder if you still have that on your old disk? You will need to uninstall PostgreSQL, data folder to the new location, and reinstall PostgreSQL – see the guide in the Documentation.

Re: Transfer of data

PostPosted: Mon May 16, 2011 12:25 pm
by Mountain runner
Yes, reinstall.
No, I dont have the original hh files, only a very small part of them.
I have moved the old data folder to another disk, uninstalled old Postgres and installed new Postgres which is empty now. How can I add my old database to it, if it is on another disk?

Re: Transfer of data

PostPosted: Mon May 16, 2011 12:54 pm
by kraada
If you have the entire PostgreSQL folder from the other computer you can put it on top of the current folder in your location (provided you're running the same PostgreSQL version) and the database should start up properly.

Re: Transfer of data

PostPosted: Mon May 16, 2011 4:14 pm
by Mountain runner
I did it in the beginning but PT3 said it could not connect to the database.
So what should I do now - delete the new Postgres and copy in its place the new one? They are both 8.3. The new one is just the latest version of 8.3.
Should the folders be named the same or it doesn't matter?

Re: Transfer of data

PostPosted: Mon May 16, 2011 4:17 pm
by kraada
Rename the working PostgreSQL folder to something else, and then rename the old PostgreSQL folder to PostgreSQL so that it's in the exact same place as the previous working installation. If all of the files are in the right place it should start up. If it doesn't, please report this problem and include any errors listed in Event Viewer (you can find Event Viewer in Start -> Control Panel -> Administrative Tools) and we'll investigate further for you.

Re: Transfer of data

PostPosted: Mon May 16, 2011 5:18 pm
by Mountain runner
Cannot rename the working service, it says, it is used by another programm.

Re: Transfer of data

PostPosted: Mon May 16, 2011 5:20 pm
by Mountain runner
Should I stop Postgres from running and then remove the new folder of Postgres (which is named Postgres NEW) and replace it with the old Postgres folder and finally rename it to Postres NEW ?

Re: Transfer of data

PostPosted: Mon May 16, 2011 5:24 pm
by kraada
The service name doesn't matter. But you'll need to stop the service before proceeding.

Currently there is some directory like C:\Program Files (x86)\PostgreSQL\ - it has an 8.3 subfolder which has many other folders beneath it.

With the service stopped rename that directory to something else.

Currently you have some other directory called, say, C:\PostgreSQLOLD\. Rename/move it so that it's now the C:\Program Files (x86)\PostgreSQL directory (if that's in fact where your working PostgreSQL directory was).

Then attempt to restart the server.

Re: Transfer of data

PostPosted: Mon May 16, 2011 5:46 pm
by Mountain runner
Ok, did that. Renamed the new folder and also renamed the old folder with the name of the "new folder".
But when I tried to start Postgres in sevices.cms it says "Windows could not start the Postgres SQL Database Server 8.3 service on Local computer. Error 2: The system cannot find the file specified."