PDA

View Full Version : HM database restoration problems - postgreSQL help wanted



Doncock
05-22-2009, 05:32 PM
I need some help from a postgreSQL expert.

I just tried to migrate my HM database from my old PC to a new one using pgAdminIII and I think I failed, since I got 156 warning. I made a mistake by not realising I had to create a new database to restore the old one in, so at first I restored the backup file to the postgres database, which was the only option I had at the time. Could this be the reason I am getting these warnings or not?(doesnt make sense, but who knows) Should I use the database ignoring the warnings or should I fix something(which I dont know how to do). I can set the restored database as default database in Holdem manager.

stretch00
05-22-2009, 05:45 PM
Did you save your old database to a folder in your computer?
did you backup database in SQL?

http://www.holdemmanager.net/faq/afmmain.aspx?faqid=2
link to FAQ for backup/restore database

Doncock
05-22-2009, 05:52 PM
I made a backup using pgAdmin and saved it to my usb harddrive creating a .backup file

stretch00
05-22-2009, 05:53 PM
here is a better page should cover what you need!

http://www.holdemmanager.net/faq/afmmain.aspx?faqid=2

stretch00
05-22-2009, 06:01 PM
this database you backed was it corrupted or was it good before you made it?

stretch00
05-22-2009, 06:07 PM
Are you with me here?So I know whats going on.I f your not I can check back later if you going through the FAQ process yourself

Doncock
05-22-2009, 06:18 PM
The database was fine when I backed it up.

I used the FAQ when I failed. The backup I did exactly like the FAQ said, but when I restored I first restored it in postgres, silly me. When there was no database for HM to connect to, I read the faq (http://www.holdemmanager.net/faq/afmmain.aspx?faqid=2) and followed the restore steps, but got all those warnings.

For some reason the links do not work, should be linked to FAQ ID # 12

stretch00
05-22-2009, 06:31 PM
The database was fine when I backed it up.

I used the FAQ when I failed. The backup I did exactly like the FAQ said, but when I restored I first restored it in postgres, silly me. When there was no database for HM to connect to, I read the faq (http://www.holdemmanager.net/faq/afmmain.aspx?faqid=2) and followed the restore steps, but got all those warnings.

For some reason the links do not work, should be linked to FAQ ID # 12

So it's still not working correct?

stretch00
05-22-2009, 06:33 PM
Have you tried to un-install PsgreSQL? and re-install?

Doncock
05-22-2009, 06:34 PM
Have you tried to un-install PsgreSQL? and re-install?

Reinstall yes, deinstall then reinstall no. I'll do that now.

stretch00
05-22-2009, 06:36 PM
here is the correct FAQ
http://www.holdemmanager.net/faq/afmmain.aspx?faqid=2

Doncock
05-22-2009, 06:59 PM
One warning left, do not know it its a problem or if you can deduce something out of it:


C:\Program Files\PostgreSQL\8.3\bin\pg_restore.exe -h localhost -p 5432 -U postgres -d "HM_1" -v "O:\New Folder\Database\HM_1.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 342; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists
Command was:
CREATE PROCEDURAL LANGUAGE plpgsql;


PS: your link is still broken, I guess. Dont think it should be faqid=2
PSS: if I press OK, pgAdmin asks if I want to restore again in the same file, so it cannot be right

stretch00
05-22-2009, 07:16 PM
sorry it should be FAQ #177 was trying to help another person but he got nasty w/me and I'm done w/him
F min he's on his own

stretch00
05-22-2009, 07:20 PM
you coul also go to FAQs and search "database" if thats still not right # and find " How to Re-Install PostgreSQL and use a previous database?

stretch00
05-22-2009, 07:22 PM
I have to go for a little while 45min- 1 hour. but will check back OK.

Doncock
05-22-2009, 07:42 PM
Reinstalling postgresql isnt the problem, that all works.

PS: The drive with working HM database is still intact, but the old PC it worked on is disassembled. I rather not rebuild it to fetch my db, but I reckon I must if the backup is corrupt.

stretch00
05-22-2009, 08:35 PM
SO you have SQL re-installed?

stretch00
05-22-2009, 08:37 PM
did you find the faq that i said earlier ?

Doncock
05-22-2009, 08:37 PM
yes, twice

stretch00
05-22-2009, 08:40 PM
How to Re-Install PostgreSQL and use a previous database?

and you followed it?

Doncock
05-22-2009, 09:00 PM
yes

stretch00
05-22-2009, 09:06 PM
ok so where are we at, you have a new sql server installed correct?
and now we just need to get the old data into the new database correct?

I,m trying to help multiple people so help me out here!

stretch00
05-22-2009, 11:20 PM
your back huh!

Doncock
05-22-2009, 11:20 PM
Yes, but I dont like to repeat myself. its rather late here, so I give up for today. Grrrr, no poker for two days:P

morny
05-23-2009, 12:35 PM
I need some help from a postgreSQL expert.

I just tried to migrate my HM database from my old PC to a new one using pgAdminIII and I think I failed, since I got 156 warning. I made a mistake by not realising I had to create a new database to restore the old one in, so at first I restored the backup file to the postgres database, which was the only option I had at the time. Could this be the reason I am getting these warnings or not?(doesnt make sense, but who knows) Should I use the database ignoring the warnings or should I fix something(which I dont know how to do). I can set the restored database as default database in Holdem manager.

Hi usually when you get warnings restoring the database its telling you the database is corrupt, do you have access to the old database, if so you could export and reimport the hands, to do so follow these instructions:

Please export your hands from the old database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173 then create a new database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=146 and reimport the hands into the new database

If you no longer have access to the old database maybe you have access to the archived hands, if so create a new database as described above and then import the archived hands.

Doncock
05-23-2009, 03:39 PM
Thank you. Took me a while to assemble the old PC and export the files and copy them to my networkdrive, but now we're importing as I type this. Will take a while to finish though:) Isnt the fastest way to fix the problem I reckon but we'll get there.

PS Thank you too for your efforts, stretch!

stretch00
05-23-2009, 03:43 PM
Glad to see your up and going foward, I felt bad I couldn't help last night. Let us know how it turns out!

Doncock
05-23-2009, 05:48 PM
Import is done, but I had 4399 import errors:(

morny
05-23-2009, 06:14 PM
From how big a sample, if its not a huge sample you can send them to me and ill see. If your mining alot there tends to be alot of errors i notice with incomplete hands, i think this is when you lose connection with 16 tables running for example youll get 16 errors so over the space of a day you might see close to or more than a hundred errors so in that context if you had a huge amount of hands it might not be an issue.

Also you may have an older version of HM, the newest is 1.08.04 so if youve an older one there may have been an update on the poker site and this would cause errors and it would be fixed in the newer version.