PDA

View Full Version : transferring (big) db during upgrade from postgreSQL 8.2 to 8.3



Chipp
12-14-2008, 06:58 AM
I didn't see anything in the faq and couldn't find any relevant threads via search. Is it as simple as just backing up my db and restoring it into 8.3 (presumably via PGAdmin)?

Thanks.

Al1
12-14-2008, 09:43 AM
About the backup of your Database, there is 3 solutions:

1) http://208.109.95.123/faq/afmviewfaq.aspx?faqid=12 (FAQ)
2) http://208.109.95.123/forum/showpost.php?p=7254&postcount=2
3) Just reimport all your hands from your saved HHs.

Chipp
12-14-2008, 06:34 PM
About the backup of your Database, there is 3 solutions:

1) http://208.109.95.123/faq/afmviewfaq.aspx?faqid=12 (FAQ)

I did see this, just wasn't sure if the switch from 8.2 to 8.3 would cause a problem w/ it.


2) http://208.109.95.123/forum/showpost.php?p=7254&postcount=2

Now that you mention it, I do remember reading that thread in the past. The text commands fabio wrote do look kinda familiar (similar to the format of those I used to cluster PT2), but I'm not really sure how to go about this.


3) Just reimport all your hands from your saved HHs.

Yea, but the db is several million hands, I'd rather not.

I guess I'll try the first method, thanks Al.

Al1
12-15-2008, 11:31 AM
Have you resolved your issue?

Chipp
12-15-2008, 11:51 AM
After some more searching I gathered that I couldn't use method 1 when upgrading from 8.2 to 8.3, so I tried fabio's way but couldn't figure it out. So I just used method 3 on my most recent, small db, and I guess I'll tackle the big one whenever I have the time.

I haven't dumped the old (big) db yet, tho, so if somebody feels like breaking down fabio's method into step-by-step instructions I'll try it again.

As an aside, after I imported the exported hands from my small db, the vacuum function in HM didn't work. The cmd window popped up and asked for a password or something.

morny
12-15-2008, 02:24 PM
Press the windows key(flag) + R or go to Start > All Programs > Accessories > Run and then type cmd

This will open a new window

type cd c:\program files\postgresql\8.x\bin and press [ENTER] then type
run pg_dumpall -U postgres > c:\dbbackup.sql and press [ENTER]

You need to replace c:\program files\postgresql\8.x\bin with the path that PostgreSQL is installed on and also change 8.x to 8.3 or 8.2 depending on what version your using.

This may take a while but the end result will be that your entire postgres database will be backed up to a file. If you want it saved to a different folder just change that c:\dbbackup.sql to something more fitting.

Press the windows key(flag) + R or go to Start > All Programs > Accessories > Run and then type cmd

This will open a new window

type cd c:\dbbackup.sql then press [ENTER]
and type psql -U postgres -f c:\dbbackup.sql postgres and then [ENTER]

This should safely backup and restore between versions

Chipp
12-15-2008, 08:19 PM
I will try that, thanks.

One more thing- 8.2 is using port 5433. So I need to use something like...
run pg_dumpall -p 5433 -U postgres > c:\dbbackup.sql, right?

8.3 is using the standard port 5432.

morny
12-15-2008, 09:10 PM
Yeah thats unusual as it uses 5432 by default so you must have changed it during that installation for some reason, maybe 5432 was busy. To be honest im not sure and i suspect you need to use the current port so try 5432 first and if that dosent work try 5433

Chipp
12-15-2008, 09:23 PM
Yeah thats unusual as it uses 5432 by default so you must have changed it during that installation for some reason, maybe 5432 was busy.

Yea, this was way back when I first installed postgreSQL for PT2...I couldn't get 5432 to work and didn't really know what I was doing so pt pat or somebody told me to just use 5433.



To be honest im not sure and i suspect you need to use the current port so try 5432 first and if that dosent work try 5433

I'll try both, thanks.

Chipp
12-19-2008, 01:55 AM
So something's up w/ postgre 8.2- I keep getting this "server doesn't listen" error message and the service can't even be started. I tried w/o my firewall/av/etc, so I don't think that's it. Maybe I messed something up in trying to do all this.

I saw one guy here had the same prob and his "fix" was to start a db on a diff windows account- haven't been able to find any more info other than that.

8.3 is working fine.

morny
12-19-2008, 11:18 AM
Have you tried changing the port since you were trying 2 different ones so if your trying 5432 then try 5433 and see if theres any difference. If the issues persist them email me morny@holdemmanager.net and well do a teamviewer session

Chipp
12-20-2008, 04:51 AM
Dumb question- how do I change ports?

morny
12-20-2008, 11:49 AM
When you open DBcontrolPanel.exe from C:\Program Files\RVG Software\Holdem Manager it will bring up a window with username, password and also port number, change it here and see if it makes a difference